Commit Graph

19675 Commits

Author SHA1 Message Date
flywind
23e10ea85e active some packages (#18825) 2021-09-09 08:46:55 +02:00
flywind
c56008450a fix CI failure(upstream changes) (#18820)
* fix upstream changes

* Update tests/js/tunittest_error2.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-09-08 11:47:14 +02:00
Jason Beetham
ee2eb5cae2 Fix subranges of distinct types (#18816) [backport] 2021-09-07 17:11:08 +02:00
Jason Beetham
30d28bcefc Fixes implicit and explicit generics in procedures (#18808)
* Fixes implicit and explicit generics

* moved block logic into 'maybeInstantiateGeneric'

* Added more tests

* Update compiler/semexprs.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-09-06 20:11:21 +02:00
Andreas Rumpf
34a53e8049 fixes #12642 (#18811)
* fixes #12642

* update important packages; refs #18804

* fixes #18805; refs #18806

* fixes a regression

* Update testament/categories.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

* progress

* progress

Co-authored-by: flywind <xzsflywind@gmail.com>
2021-09-06 17:43:03 +02:00
Jason Beetham
90bfd34250 '[]' can now be used for iterators (#18814) 2021-09-06 15:30:49 +02:00
Andreas Rumpf
cc5422ae50 Atlas: added 'extract' command, as promised (#18813) 2021-09-06 13:19:11 +02:00
Andreas Rumpf
73841ae194 fixes #14165, fixes #18739, fix the second example of #6269 (#18812) 2021-09-06 13:12:14 +02:00
Jason Beetham
7ae52d7791 Fix recursive generic typed defs (#18809) 2021-09-06 09:43:26 +02:00
Miran
f373c17ad9 use new Nimble, with lockfiles (#18810) 2021-09-06 09:40:31 +02:00
flywind
4320b158dd add weave to important packages (#17665)
* add weave to important packages

* Update testament/important_packages.nim
2021-09-05 16:50:54 +08:00
Andreas Rumpf
2e2d928846 formal grammar updates [backport:1.2] (#18803) 2021-09-04 19:52:57 +02:00
Andreas Rumpf
5c85e480a6 unicode operator bugfixes (#18802) 2021-09-04 17:49:27 +02:00
Andreas Rumpf
e8dad482a3 fixes #16246 (#18800) 2021-09-04 15:57:16 +02:00
flywind
b3ad68edea remove channels (#18801)
* remove channels

* test
2021-09-04 15:57:02 +02:00
Sven Keller
3c2edd142b fix for js strict mode (#18799)
* Assignments, which would accidentally create global
variables, instead throw an error in strict mode

* Assignment to a getter-only property

Co-authored-by: Sven Keller <s.keller@cortona.de>
2021-09-04 12:53:02 +02:00
Andreas Rumpf
686096a912 documented overloadable enums and changelog improvements (#18797) 2021-09-04 12:52:24 +02:00
Andreas Rumpf
ac7acd827c we need something better than warningAsError for effect handling viol… (#18796)
* we need something better than warningAsError for effect handling violations
2021-09-04 08:18:00 +02:00
Andreas Rumpf
cddf8ec6f6 implements https://github.com/nim-lang/RFCs/issues/407 (#18793) 2021-09-03 21:52:24 +02:00
Andreas Rumpf
c2b20516d3 implemented Unicode operators (#18789)
* implemented Unicode operators; refs https://github.com/nim-lang/RFCs/issues/388

* bugfix

* better test

* arguably more elegant implementation

* Update changelog.md

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-09-03 17:31:16 +02:00
flywind
905fae51f6 remove unnecessary if statement (#18792) 2021-09-03 16:41:00 +02:00
Andreas Rumpf
06ff0e9624 fixes #18769 (#18790) 2021-09-03 15:18:55 +02:00
Jacek Sieka
0635697a89 Document -d:async_backend flag (#18700)
* Document `-d:asyncBackend` flag

Since libraries may want to support multiple async backends, it's useful
to standardize the way this is done, so as to simplify usage of any
async backend within the ecosystem.

A similar text is being added to chronos here:
https://github.com/status-im/nim-chronos/pull/216

See also https://github.com/status-im/nim-chronos/issues/207

* typos, add none

* Update lib/pure/asyncdispatch.nim

* Update lib/pure/asyncdispatch.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-09-03 14:20:57 +02:00
Andreas Rumpf
0887dcc398 fixes #18786 (#18788) 2021-09-03 09:03:26 +02:00
Timothee Cour
64165f03fc testament --megatest:off now makes tests non-joinable so that they all run (#18787) 2021-09-03 07:15:08 +02:00
Andreas Rumpf
f46569bafd fixes #18494 (#18783) 2021-09-02 17:16:03 +02:00
Andreas Rumpf
a7cae2bda2 fixes #16325 [backport:1.4] (#18784) 2021-09-02 17:15:11 +02:00
Andreas Rumpf
69cabaa81c sequtils now support strict effect tracking (#18782) 2021-09-02 14:35:25 +02:00
Tomohiro
7c8ea490a2 Fix initrand to avoid random number sequences overlapping (#18744)
* Fix initrand to avoid random number sequences overlapping

* Minor fix

* Fix compile error on js backend

* Disable new test for js backend

* Minor fix

* tempfiles module uses random.initRand()

* Remove unused module import from lib/std/tempfiles.nim

* Initialize baseState in initRand()

* Run tests/stdlib/trandom.nim from tests/test_nimscript.nims

* baseState is initialized only with sysrand.urandom and quit if failed

* Add comments
2021-09-02 14:12:14 +02:00
Andreas Rumpf
e0ef859130 strict effects (#18777)
* fixes #17369
* megatest is green for --cpu:arm64
* docgen output includes more tags/raises
* implemented 'effectsOf' 
* algorithm.nim: uses new effectsOf annotation
* closes #18376
* closes #17475
* closes #13905
* allow effectsOf: [a, b]
* added a test case
* parameters that are not ours cannot be declared as .effectsOf
* documentation
* manual: added the 'sort' example
* bootstrap with the new better options
2021-09-02 12:10:14 +02:00
flywind
72fa5833ad fix #9778 (pairs iterator calling a helper proc with tuple return type will cut the iterator yield into half) (#18767)
* test someSymFromImportTable
* Update compiler/lookups.nim
* test nkTupleConstr
* use isConstExpr
* add tests
* add comments and todo
* use todo
2021-09-02 07:41:14 +02:00
flywind
3469f3a393 add Apple Silicon to supporting platforms (#18772)
* add Apple Silicon to supporting platforms

* Update readme.md

Co-authored-by: flywind <xzsflywind@gmail.com>

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-31 14:05:45 +02:00
flywind
8f4bdb3596 [minor]break loops after a candidate is added to seqs (#18770)
* [minor]break loops when added

* Update compiler/lookups.nim

Co-authored-by: Clyybber <darkmine956@gmail.com>

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-08-31 13:32:37 +02:00
konsumlamm
f02de25ca1 Fix #15150 (#18730) 2021-08-31 08:14:05 +02:00
Timothee Cour
fa7c1aa864 move PNode.comment to a side channel, reducing memory usage during compilation by a factor 1.25x (#18760)
* move PNode.comment so a side channel, reducing memory usage

* fix a bug

* fixup

* use sfHasComment to speedup comment lookups

* fix for IC

* Update compiler/parser.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-29 15:54:07 +02:00
konsumlamm
0ddd9519c0 Remove Covariance section from the experimental manual (#18688)
* Remove `Covariance` section

* Add blank lines after `.. code-block::`

* Fix CI?
2021-08-29 10:42:52 +02:00
flywind
c07d8da7b9 add missing docs (#18758) 2021-08-29 09:18:54 +02:00
Timothee Cour
014edde36a followup #18759: make compiler build cleanly with 0 warnings/hints (#18764) 2021-08-28 16:34:27 -07:00
Miran
719718df2f more minor bootstrapping cleanups (#18759) 2021-08-28 08:27:56 +02:00
flywind
5eba372570 [minor] break loops if it is ambiguous (#18745)
* [minor] break loops if it is ambiguous

* Update compiler/lookups.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-08-27 11:50:06 +02:00
Juan Carlos
041edaa1df Implement RFC-413 (#18749)
* Implement RFC 413

* Implement RFC 413

* Implement RFC 413

* Implement RFC 413

* https://github.com/nim-lang/Nim/pull/18749#discussion_r696320995

* Update lib/js/dom_extensions.nim

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>

* Update lib/js/dom_extensions.nim

* https://github.com/nim-lang/Nim/pull/18749#discussion_r696913310

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-26 23:07:54 +02:00
Timothee Cour
98f7254fb2 followup #18711 grammar_nanny now reports unused non-terminals (#18746)
* followup #18711 cleanup unused grammar rules

* make tools/grammar_nanny.nim report unused terminals

* revert removal of some grammar comments
2021-08-26 07:04:18 +02:00
Dankr4d
c70e4040bd fixes #14511 [backport:1.4] (#18732)
* fixes #14511 [backport:1.4]

Signed-off-by: Dankr4d <dude569@freenet.de>

* Replaced fix with code from alaviss, for better readability, with small
changes.

Signed-off-by: Dankr4d <dude569@freenet.de>

* - Specified output in test.

Signed-off-by: Dankr4d <dude569@freenet.de>

* Replaced case in nnkRecCase with a simpler version, which just adds the
last son.

Signed-off-by: Dankr4d <dude569@freenet.de>

* Update tests/macros/t14511.nim

* Update tests/macros/t14511.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-08-25 17:27:00 +00:00
Timothee Cour
3aa16c1de0 fix RFC #341: dot-like operators are now parsed with same precedence as . (#18711)
* fix RFC #341: dot-like operators are now parsed with same precedence as `.`

* fixup

* [skip ci] address comment in changelog

* address comment

* update grammmar

* add manual entry

* fixup

* -d:nimPreviewDotLikeOps

* address comment to unblock PR: move nimPreviewDotLikeOps out of config/config.nims
2021-08-25 06:50:40 +02:00
flywind
3d1bba04ab [minor]use addInt and addFloat (#18733)
* unify int and uint

* back

* minor
2021-08-24 17:16:12 +02:00
Miran
24178bf8aa get rid of the warnings during bootstrapping (#18741)
* fix bootstrapping hints and warnings

* revert removals in ccgtypes
2021-08-24 17:15:26 +02:00
flywind
9674ff4361 make deprecated message better (#18737) 2021-08-23 11:13:10 -07:00
flywind
8a8267e2bc fix a typo (#18736) 2021-08-23 21:05:22 +08:00
konsumlamm
2d84f6e7c8 Fix #18718 (#18731)
Update tests
2021-08-23 00:13:39 +02:00
Juan Carlos
e65dc36ddd Implement RFC-391 (#18585) 2021-08-22 12:32:55 -07:00