Commit Graph

5114 Commits

Author SHA1 Message Date
flywind
834d5641e8 use sink and lent in deques (#17661)
* use sink and lent in deques

* Update lib/pure/collections/deques.nim

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-04-07 14:17:48 +02:00
Andreas Rumpf
939df8cbda ensure the avr example keeps compiling (#17663)
* ensure the avr example keeps compiling

* Update tests/avr/thello.nim

* now compiles properly
2021-04-07 13:40:57 +02:00
flywind
e406e28738 fix #16898 #17621 (#17628)
* fix #16898
* fix #17621

* Update compiler/semtypes.nim
2021-04-06 18:01:54 +02:00
flywind
c7b4639460 ref #14873 (#17644)
* ref #14873

* comment

* Update lib/core/locks.nim
2021-04-06 16:21:58 +02:00
flywind
7bfb9f0002 close #17636 (#17643) 2021-04-06 16:20:01 +02:00
Saem Ghani
5261579175 [nim-gdb] Fixed enums and flag output [ci skip] (#17634)
Debugger works for enums again. Additionally, flags work better than before.

Reworked object printer as well, but the approach needs much more work or has
to be replaced all together. This is mostly to save the work and myself or
someone else can revisit it.
2021-04-05 11:37:28 +02:00
Andrey Makarov
ca405167ed fix :number-lines: regression (#17639) 2021-04-05 08:33:06 +02:00
flywind
70a30317f7 fix #16693: testament spec nimout too lax (#16698)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-04 13:47:28 -07:00
Andrey Makarov
f02e159b56 fix rst option list at EOF (follow-up #17442) (#17638) 2021-04-04 11:54:26 -07:00
Timothee Cour
4a11a04fba fix #14850: repr now correctly renders do (#17623)
* fix #14850: `repr` now correctly renders `do`

* add tests

* fix test
2021-04-03 16:05:37 +02:00
Timothee Cour
fe7a76f62f repr: fix rendering of 'big, =destroy etc (#17624) 2021-04-03 08:19:17 +02:00
flywind
61c1e35181 close #14806 (#17626)
* close #14806

* tiny
2021-04-03 08:17:55 +02:00
Timothee Cour
270964c487 implement RFCs/294 ; disallow enum <=> enum conversion (#16351)
* fix https://github.com/nim-lang/RFCs/issues/294 ; disallow enum <=> enum conversion
* fix the runnableExamples that was the instigator of this RFC
* legacy -d:nimLegacyConvEnumEnum
* use -d:nimLegacyConvEnumEnum in important_package nimgame2
* add test for enum cast
* improve changelog
* add changelog: Changes affecting backward compatibility
* cleanup changelog
* fix changelog
2021-04-03 07:15:21 +02:00
flywind
a807233aeb fix #17615(runnableExamples silently ignored if placed after some code) (#17619)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-02 18:26:30 -07:00
Andrey Makarov
e35946f306 enable syntax highlighting for inline code (#17585)
* enable syntax highlighting for inline code

* finish '.. default-role' and preliminary '.. role'

implementation

* more compact check in dirRole

* set :literal: as default role for *.rst

* Update lib/packages/docutils/rst.nim

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

* use whichRole for setting currRoleKind

* Update lib/packages/docutils/rst.nim

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

* rename rnGeneralRole -> rnUnknownRole

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-04-02 22:11:44 +02:00
Timothee Cour
9abd383a2a new genAst as replacement for quote do (#17426)
* new `macros.genAst`: fixes all issues with `quote do`
* add changelog entry
* add workaround for https://github.com/nim-lang/Nim/issues/2465#issuecomment-511076669
* add test for #9607
* add kNoExposeLocalInjects option
* add test case for nested application of genAst
* genAst: automatically call newLit when needed
* allow skipping `{}`: genAst: foo
* add test that shows this fixes #11986
* add examples showing mixin; add examples showing passing types, macros, templates
* move to std/genasts
* improve docs
2021-04-02 13:11:03 +02:00
flywind
774e66f3d1 close #7875 add testcase (#17611)
* close #7875 add testcase

* fix
2021-04-02 11:56:30 +02:00
konsumlamm
f0587e02e2 Fix #17017 (math edge cases) (#17588)
* Fix #17017

Add more test cases

* USe signbit in example
2021-04-01 12:47:56 +02:00
flywind
e25a487ed6 close #6133 add testcase (#17605)
* close #6133 add testcase

* b
2021-04-01 12:46:47 +02:00
flywind
6f53579a8c close #9534 add testcase (#17607) 2021-04-01 08:47:59 +02:00
flywind
924ab3adea fix #17190 nimscript now accepts arbitrary file extensions for nim e main.customext (#17596)
* fix #17190

* cah

* merge

* Update tnimscriptwithnimext.nim

* Update tnimscriptwithmacro.nims

* Apply suggestions from code review

* Delete tnimscriptwithnimext.nim

* Update tests/tools/tnimscriptwithmacro.nims

* fix

* fix

* add a test

* Apply suggestions from code review

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

* Apply suggestions from code review

* Update changelog.md

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

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-04-01 08:05:04 +02:00
flywind
fe9a37f2a5 close #12684 add testcase (#17599) 2021-03-31 20:55:27 +02:00
flywind
3f9c26539d close #16786 (#17598) 2021-03-31 20:54:36 +02:00
Timothee Cour
9b67e5c61b jsonutils: support cstring (including as Table key); improve docs (#16062)
* jsonutils: support cstring (including as Table key); improve docs
* changelog
* un-disable a test now that #16061 was fixed
2021-03-31 18:24:39 +02:00
Timothee Cour
b18307f940 fix #17572 (#17586) 2021-03-31 11:27:02 +02:00
Timothee Cour
6d7d1e60fe fix #14585, fix #17589: access to static param now works (#17590) 2021-03-31 11:25:26 +02:00
Timothee Cour
8ee0eda841 fix #12282 distinct now does not create erroneous copy in VM (#17594) 2021-03-31 10:15:08 +02:00
flywind
7c09e0c757 fix #15617(fix compilation failure on -d:useMalloc --gc:none) (#17555)
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-30 20:15:14 +02:00
Timothee Cour
72988509ba add getPort to resolve Port(0) (#17559)
* add getPort to resolve Port(0)

* fixup

* use getPort in examples + tests

* address comments: do not re-export Port
2021-03-30 20:14:39 +02:00
Ardek Romak
9e88425d7c Fix void async in templates (#17562)
* Fix https://github.com/nim-lang/Nim/issues/16159
* Add test for async in template
* Shorten the expression
* Even shorter

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-03-30 08:07:45 +02:00
Arne Döring
159c06e045 unify tuple expressions (#13793)
* unify tuple expressions

* fix test

* fix test

* apply feedback

* Handle empty tuples

* Fix rendering named unary tuple

* Protect static NimNode against stripping

* Slightly less hacky

* Revert "Slightly less hacky"

This reverts commit 170c5aec0addc029f637afbc948700ca006b7942.

* Slightly less hacky

* Cleanup

* Fix test

* Fix another test

* Add condsym

* Rebase fallout

* changelog: Move from compiler changes to language changes

* Add stricter tests

* Add empty tuple example to doc/astspec

* Fix test

Co-authored-by: Clyybber <darkmine956@gmail.com>
2021-03-30 02:06:51 +02:00
flywind
1f1ef85eb0 [std/uri]fix #17481 (#17568) 2021-03-29 11:48:06 -07:00
Andrey Makarov
861c42c258 RST: enable parsing of prefix roles (ref #17340) (#17514) 2021-03-29 18:32:49 +02:00
flywind
3f9c51a332 [nim check]fix #17460 (#17569) 2021-03-29 09:28:55 -07:00
flywind
7ad49950bd [os:standalone]fix #14011 (#17564) 2021-03-29 17:54:28 +02:00
Andreas Rumpf
cfff27529e added nkError to the AST (#17567)
* added nkError to the AST

* Update lib/core/macros.nim

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

* Update compiler/ast.nim

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

Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
2021-03-29 16:23:19 +02:00
flywind
81e54c1d30 Add hasClosure to std/typetraits (#17501)
* fix nim js cmp fails at CT

* Add `hasClosure` to `std/effecttraits`

* type

* Update changelog.md

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

* Update lib/std/effecttraits.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
2021-03-29 14:22:29 +02:00
Saem Ghani
c6dc9c0255 fixes #17437 - crash where error reporting > 1 (#17547)
* fixes #17437

* Fix bug reference comment

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

* [skip ci] describe why we have hasError

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-29 12:48:00 +02:00
flywind
085580a2c8 fix #14010(fix std/registry + arc) (#17551)
* fix nim js cmp fails at CT

* fix #14010

* Update tests/stdlib/tregistry.nim

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

* Update tregistry.nim

Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-29 10:50:58 +02:00
flywind
a5600e49df close #9622 add testcase (#17557)
* fix nim js cmp fails at CT

* close #9622 add testcase
2021-03-29 01:40:37 +02:00
Ardek Romak
207bcabdf2 Add a getter for all defined Sections in parsecfg (#15450) 2021-03-28 09:57:40 -07:00
flywind
c86fdfa1ee add testcase for #9466 (#17538) 2021-03-28 00:57:22 -07:00
Timothee Cour
bbe4cf4703 followup custom literals (#17500) 2021-03-27 12:03:14 -07:00
flywind
d3705b253c close #5792 with testcase (#17536) 2021-03-27 10:18:35 -07:00
flywind
9c52009de6 close #7012 add testcase (#17537) 2021-03-27 10:12:11 -07:00
Timothee Cour
a65189a739 nnkArglist => nnkArgList + special case stylecheck:error (#17529)
* nnkArglist => nnkArgList

* special case stylecheck:error
2021-03-27 10:28:11 +01:00
Timothee Cour
8ed6de4fe6 fix flaky tnetconnect which sometimes failed with: No route to host [OSError] (#17526) 2021-03-27 10:22:42 +01:00
flywind
b1b767ed0d close #17157 add testcase (#17531) 2021-03-27 01:51:57 -07:00
Clyybber
bb3769975b Fix #17199 (#17348)
* don't zero out in a move in the VM

* Add testcases for #17199

* Update tests/arc/tarcmisc.nim

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

* Update tests/vm/tissues.nim

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

* Fix test failures

* Fix test

* Fix tests

Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
2021-03-26 13:05:51 +01:00
Andreas Rumpf
e3e9742143 added a 'koch ic' command for easier adhoc testing of IC (#17508)
* added a 'koch ic' command for easier adhoc testing of IC
* IC: progress
* IC: enable generics test
* make tests green
2021-03-26 08:52:26 +01:00