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
flywind
07991d902e
[docs minor] close #17618 ( #17620 )
...
* [docs minor] close #17618
* Update lib/pure/times.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-04-02 22:06:29 +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
flywind
792a03b756
[docs minor] close #16553 ( #17612 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-04-02 00:18:40 -07:00
flywind
2365b5250e
docs: note regarding emit with backticks ( #17608 )
2021-04-01 21:06:50 -07: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
f3c504e49a
a bit better message ( #17606 )
2021-04-01 08:49:10 +02:00
Timothee Cour
a31e601550
misc fixes: build_all.sh, changelog ( #17601 )
...
* fix a bug in build_all.sh: $@ => "$@"
* remove getSocket from changelog following #17587
* remove unused import
2021-04-01 08:48:44 +02:00
flywind
6f53579a8c
close #9534 add testcase ( #17607 )
2021-04-01 08:47:59 +02:00
Timothee Cour
a7bb973a24
docgen: render pragmas by default except for a select list (and fix #9074 ) ( #17054 )
2021-04-01 08:45:55 +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
Dominik Picheta
65efa727ff
Removes asynchttpserver.getSocket. ( #17587 )
2021-03-31 18:20:42 +02:00
narimiran
0be7f854ed
[ci skip] correct indentation this time
2021-03-31 13:45:14 +02:00
narimiran
d3529d0d5a
[ci skip] minor: fix indentation in manual.rst
2021-03-31 13:34:32 +02:00
Andreas Rumpf
ece7147734
better error messages for .raise effect analysis ( #17595 )
2021-03-31 13:26:44 +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
Andreas Rumpf
5ecbe67371
makes DrNim compile again ( #17584 )
2021-03-30 20:13:18 +02:00
rockcavera
af2a7e8cbc
Rotation right and left refactored to generics. Continuation of #16622 ( #17578 )
...
* Rotation right and left refactored to generics
Continuation of [16622](https://github.com/nim-lang/Nim/pull/16622 )
* add runnableExamples
2021-03-30 12:24:21 +02:00
Araq
f5b1e384a4
parser.nim: simply layout change
2021-03-30 10:29:50 +02:00
flywind
3715fc41d5
fix #17512 ( #17520 )
2021-03-30 10:27:24 +02:00
Miran
40093b4a93
[backport:1.2] Avoid inlining of newObj and newObjRC1 calls ( #17582 )
...
This is taken from:
af69b3ceae
Full original comment:
This is to avoid heavy inlining happening when two allocation calls
would occur shortly after each other.
This inlining would sometimes be accompanied with an optimisation
as the compiler is able to see that cellToUsr ending the first
allocation call is shortly followed by an usrToCell call. The
pointer arithmetic is redundant and the compiler can eliminate it,
leaving only the cell address in a register (and later the stack)
instead of the actual pointer to the user data, as one would expect.
This combined with a GC collect cycle will cause the stack scan to
only notice the cell address, which is of no good due to a usrToCell
in the gcMark call which shifts that address to an adjacent cell.
This means that the actual cell of importance will not get marked
and thus cause a premature collection of that cell. BOOM.
2021-03-30 10:20:58 +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
Clyybber
a672ec3c9e
Fix #17299 , fix setAffinity for android ( #17574 )
...
* Fix #17299
* Comment
* Fix typo
2021-03-30 08:05:37 +02:00
Danil Yarantsev
8db93fd0a2
Fix entries in nimc advopt ( #17576 )
2021-03-30 08:04:17 +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
Dylan Modesitt
35655cd189
Add hasDataBuffered to asyncnet ( #16000 )
...
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-29 16:12:58 -07:00
Clyybber
ed126794b6
Fix #17412 ( #17560 )
...
* Fix #17412
* Address review
2021-03-29 21:16:11 +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
Timothee Cour
d23a757765
fix https://github.com/nim-lang/RFCs/issues/352 : show top-level import for top-level runnableExamples in generated docs ( #17542 )
...
* fix https://github.com/nim-lang/RFCs/issues/352 : show top-level import for top-level runnableExamples in generated docs
* use canonical imoprt
* fix test
2021-03-29 16:25:27 +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
Clyybber
1a407402a4
Typo in vm.nim
2021-03-29 16:03:54 +02:00
flywind
e2269f9216
[docs]fix #17473 ( #17565 )
...
* 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 >
* fix #14011
* Delete ttypetraits.nim
* Apply suggestions from code review
* fix #17473
* Revert "fix #14011 "
This reverts commit 0eed97a84b .
* Update lib/system.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-03-29 14:39:49 +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
Timothee Cour
04520c0ce4
remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs ( #17543 )
...
* remove std/ prefix from doc/lib.rst now that canonical import is shown in module docs
* cleanup top docs for std/sha1
2021-03-29 13:07:14 +02:00
Danil Yarantsev
89e0e0f27f
Small doc fixes in net ( #17566 )
2021-03-29 13:06:23 +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
Timothee Cour
8b26b3ad0d
remove docutils.nimble (not a real nimble package, and affected canonical imports) ( #17544 )
...
* remove docutils.nimble (not a real nimble package, and affected canonical imports)
* cleanup redundant references
2021-03-29 12:46:53 +02:00