Juan M Gómez
4754c51f1b
Pragma to force the exportc of a type. #21645 ( #21648 )
...
exportc export all types not just those used by exported proc/globals
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-04-24 17:44:29 +02:00
ringabout
0f226c0e48
fixes #21703 ; moveOrCopy should consider when vm ( #21721 )
2023-04-24 14:57:48 +02:00
Andreas Rumpf
20b011de19
refactoring in preparation for better, simpler name mangling that wor… ( #21667 )
...
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly
* use new disamb field
* see if this makes tests green
* make tests green again
2023-04-24 06:52:37 +02:00
metagn
380dafcc32
fix iterator equality + add test for proc equality + fix sameType ( #21707 )
...
* fix iterator equality + add test also for procs
fixes #21706
* all targets
* and isNil and repr
* separate overloads, fix sameType
* more restricted sameType?
* merge overloads again??
* remove sametype change for now
* fix sameType anyway (CI failure was not related)
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2023-04-23 17:43:59 +08:00
ringabout
265a340e80
fixes booting warnings ( #21711 )
...
follow up https://github.com/nim-lang/Nim/pull/21604
2023-04-23 15:34:46 +08:00
metagn
6ad246b215
temporarily disable badssl tests ( #21710 )
...
* temporarily disable badssl tests
refs #21709
* fix
2023-04-23 07:09:25 +02:00
metagn
63d29ddd69
alias syntax fixes, improvements and tests ( #21671 )
...
* alias syntax fixes, improvements and tests
* even better, cannot use alias syntax with generics
* more type tests, improve comment
* fix again
* consistent error message + make t5167_5 work
* more comments, remove {.noalias.}
2023-04-22 09:11:56 +02:00
Juan M Gómez
c136ebf1ed
implements #21620 : allowing to import multiple modules with shared names ( #21628 )
2023-04-21 15:40:13 +02:00
ringabout
4fa86422c0
stdlib tests now check refc too ( #21664 )
...
* stdlib tests now check refc too
* typo
* fixes line numbers
* disable cpp
* do not touch
2023-04-21 15:37:58 +02:00
Raynei
48de0d0cf4
Documented path substitution by compiler ( #21662 )
...
Document compiler path substitution (nim-lang#19928)
2023-04-21 15:37:21 +02:00
ringabout
b54b03d04f
tweak spellsuggest; three counts for equal distances candidates by default ( #21700 )
...
* tweak spellsuggest; three counts for equal distances candidates
* only suggest typos when length > 3
2023-04-21 15:36:18 +02:00
quantimnot
175a83c2de
refact: Remove assertion effect hiding workaround ( #21472 )
...
refact: Remove asseertion effect hiding workaround
There was a code comment to remove after bootstrapping with `nim >= 1.4.0`.
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2023-04-21 18:06:20 +08:00
Bung
d76458a6cd
add test for #13764 ( #21699 )
2023-04-21 18:05:50 +08:00
Yardanico
418e54452b
Fix json.to for float fields that are not present ( #21695 )
2023-04-21 06:11:30 +02:00
ringabout
f9477396a6
static link pthread correctly ( #21693 )
2023-04-20 17:35:15 +02:00
Thiago
ed7c6cdc98
Fixed window.find return ( #21621 )
...
https://developer.mozilla.org/en-US/docs/Web/API/Window/find
2023-04-19 21:51:23 +02:00
ringabout
135b677704
fixes nightlies regression ( #21689 )
...
* fixes nightlies regression
ref https://github.com/nim-lang/Nim/pull/21659
ref https://github.com/nim-lang/nightlies/actions/runs/4727252660/jobs/8387899690
> /home/runner/work/nightlies/nightlies/nim-1.9.3/lib/std/sysrand.nim(198, 12) Error: cannot evaluate at compile time: EINTR
Because EINTR is not a const on i386
* Update lib/std/sysrand.nim
2023-04-19 11:56:12 +02:00
ringabout
9cb06d357e
fixes #21540 ; deref block at transf phase to make injectdestructors function properly ( #21688 )
...
* fixes #21540 ; deref block at transf phase to make injectdestructors function properly
* add a test case
* add one more test
* fixes the type of block
* transform block
2023-04-19 11:55:54 +02:00
Bung
0d6b994bee
fix #20997 ( #21165 )
...
* fix #20997
* use ptr UncheckedArray[uint8] instead
2023-04-19 09:50:49 +02:00
ringabout
d2d849db8e
docuement case statement breaking changes in the changelog ( #21686 )
...
Reported on Discord
follow up https://github.com/nim-lang/Nim/pull/20862
2023-04-19 14:19:30 +08:00
Andrey Makarov
24b6378382
Fix RST/Markdown false heading detection ( #21685 )
2023-04-18 10:37:47 +02:00
metagn
2f547afb0f
import brackets support as and prefixes [backport] ( #21636 )
...
* import brackets support `as` and prefixes
fixes #21635
* copyTree -> copyNode
2023-04-18 10:35:35 +02:00
metagn
9dc1f2dd0f
actually fix #19015 ( #21680 )
...
* actually fix #19015
* more tests
* round out
2023-04-17 20:56:52 +02:00
metagn
202b190473
revert #21227 ( #21681 )
...
* revert #21227 but keep test
* add test for #21677
* don't export
* delete test
2023-04-17 20:56:11 +02:00
metagn
b0a98cc01e
warn on set types bigger than max size, default to 0..255 for int literals ( #21659 )
...
* test implicitly huge set types
refs https://github.com/nim-lang/RFCs/issues/298
* oh my god
* boot at least
* don't error, fix remaining issues, no 2 len arrays
* fix runnable example
* test assuming 0..255 for int literal
* test refactor, add changelog, test
2023-04-17 20:55:22 +02:00
Emery Hemingway
2621f78b68
compiler/docgen: pass --path:… to runnableExamples ( #21669 )
2023-04-17 20:53:42 +02:00
ringabout
65223e6f59
fixes #21674 ; lent can be used in the fields or the cast type as a parameter ( #21684 )
...
* fixes #21674 ; `lent` can be used in the fields or the cast type as a parameter
* add a test case
* fix the test
2023-04-18 00:31:47 +08:00
ringabout
91e4381a20
fixes #20155 ; repr range with distinct types is broken in ORC ( #21682 )
...
fixes #20155 ; repr range with distinct types is broken with ORC
2023-04-17 17:08:53 +02:00
metagn
8c4b7129b5
fix small mistake from #21629 ( #21672 )
2023-04-17 17:07:09 +02:00
Jaremy Creechley
1af21c2668
change compile pragma to use mangled compile objects ( #21678 )
...
change compile pragma to use mangle
2023-04-17 14:17:02 +02:00
Mamy Ratsimbazafy
938f5c5e99
LTO improvements - fix #15578 ( #21679 )
2023-04-17 13:02:34 +02:00
Andrey Makarov
a0da74ed4c
Update nim 2.0 documentation for docgen & nimgrep ( #21665 )
...
* Update nim 2.0 documentation for docgen & nimgrep
* [skip ci] Update changelogs/changelog_2_0_0.md
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* [skip ci] expand section on Markdown migration and `doctype`
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-04-17 10:57:51 +02:00
Andreas Rumpf
ea8aafa7c9
minor codegen bugfix ( #21670 )
2023-04-15 01:17:17 +02:00
ringabout
512517c223
fixes #18146 ; fixes #19372 ; disable tlsEmulation on windows; static link pthreads with mingw ( #21668 )
...
* fixes #18146 ; disable tlsEmulation on windows; static link libwinthreads DLL
* whatever
2023-04-14 22:52:35 +02:00
metagn
1a99bcd6ab
runnableExamples imports std/assertions by default ( #21658 )
...
closes https://github.com/nim-lang/RFCs/issues/499
2023-04-14 12:39:23 +02:00
metagn
2a0d8a9a06
make grammar a bit more honest ( #21655 )
...
* test if expr parsing expr
refs #19802
* in any case
* just be honest
* fix symbol/keyword issue too
2023-04-14 12:34:49 +02:00
metagn
c694d8e4fd
custom pragmas: correct error condition, remove outdated symkind whitelist ( #21653 )
...
* test not restricting custom pragma applied symbols
fixes #21652
* fix other test
* different patch
* fix tests
* actually test #18212 and other routines
2023-04-13 12:50:43 +02:00
ringabout
16f42084d3
fixes #20900 ; Calling template through from generic function across module fails to build ( #21649 )
...
* fixes #20900 ; Calling template through from generic function across module fails to build
* sanother way
2023-04-13 12:11:06 +02:00
metagn
3f51b6f73d
set module symbol type to None instead of nil for discard check ( #21657 )
...
* set module symbol type to None instead of nil
fixes #19225
* alright
2023-04-13 11:56:16 +02:00
ringabout
c33ab0ba38
stops building nimsuggest twice and nim_dbg in tests; saves 3 * 5 minutes CI time ( #21654 )
...
stop building nimsuggest twice and nim_dbg in tests; saving 3 * 5 minutes CI time
2023-04-13 11:52:24 +02:00
ringabout
1ed54b7718
fixes #21632 ; enforce deref for wasMoved in ORC ( #21647 )
...
fixes #21632 ; enforce deref for `wasMoved`
2023-04-12 10:45:45 +02:00
metagn
f05387045d
int64/uint64 as bigint in JS ( #21613 )
...
* int64/uint64 as bigint in JS
* fix CI
* convert to compile option
* fix lie
* smaller diff, changelog entry
2023-04-11 21:20:20 +02:00
metagn
be06446ffe
fix #15691 ( #21623 )
...
`semProcAux` has a check for `checkMinSonsLen(n, bodyPos + 1)`
2023-04-11 09:37:53 +02:00
metagn
1bb117cd7a
proc typeclass accounts for iterator, call conventions + nil fix + document typeclass AST (#21629 )
...
* test fix #16546 #16548 + another issue
* please don't tell me other packages do this
* fix CI + test typeclass callconv pragma
* better logic in parser
* docs and changelog
2023-04-11 09:23:41 +02:00
Andrey Makarov
420b0c14eb
Fix option lists with additional indentation in Markdown ( #21633 )
...
This is more Markdown-ish way to fix issue #21055 , then PR #21625 .
It does not enable RST definition lists, instead it makes
adding additional indentation (less than 4) right after a paragraph
be ignored, as it's done for all block elements in Markdown.
(In this case this tenet is applied to option lists that are not
part of CommonMark spec by themselves).
2023-04-11 06:40:20 +02:00
ringabout
4c073cffbe
disable i386 tests for now; help wanted ( #21642 )
...
I have done some investigations but still cannot figure it out in https://github.com/nim-lang/Nim/pull/21637 , https://github.com/nim-lang/Nim/pull/21612 and https://forum.nim-lang.org/t/10069 . If someone has a clue, please enlighten me.
2023-04-11 06:39:31 +02:00
ringabout
5e016e4466
fixes #21638 ; fromJson should support empty objects ( #21641 )
...
* fixes #21638 ; `fromJson` should supports empty objects
* complete the logic
2023-04-11 06:38:30 +02:00
Etan Kissling
75205fee93
terminal size env-vars have precendence in POSIX ( #21643 )
...
In POSIX Base Definitions Section 8.1 Environment Variable Definition,
it is explained that the `COLUMNS` and `LINES` environment variables,
if present, take precedence over any other implementation-defined method
to determine the terminal size. This is useful, for example, to capture
output programmatically in simulations for various terminal sizes.
2023-04-11 11:43:21 +08:00
ringabout
4d683fc689
fixes booting warnings ( #21583 )
2023-04-10 09:43:12 +02:00
metagn
16bc546aea
remove useVersion ( #21626 )
...
test removing useVersion
2023-04-08 11:42:17 +02:00