n5m
6b4ea88734
use almostEqual in tstats.nim ( #20431 )
...
prefer math.almostEqual
2022-09-26 15:42:26 -04:00
ringabout
cb24eea86b
fixes #20426 ; remove maincommand and m options since they are a no op since 2014 ( #20429 )
...
* bump macOS image on Azure CI to macos-11
##[warning]The macOS-10.15 environment is deprecated, consider switching to macos-11(macos-latest), macos-12 instead. For more details see https://github.com/actions/virtual-environments/issues/5583
* fix CI error
* fixes #20426 ; remove `maincommand` and `m` options since they are a noop since 2014 and causes confusion
fixes #20426
7f7b13a45f (diff-d949f8c356fd2dc9ceedc6f3dbbd01e2c806269dd0a8ad6516facf589fa2c99a) makes it a no op, but it causes a regression because it should add `expectArg(switch, arg, pass, info)` before the discard statement. It causes https://github.com/nim-lang/Nim/issues/20426 to happen. Without `expectArg(switch, arg, pass, info)`, `-mm:orc` is wrongly interpreted as `-m` and compiler, which doesn't make sense. It should either abort compilation or prints `argument for command line option expected: '-m'` message. Since they are a no op since 2014, let's remove it to clear the confusion. Let's wait and see whether it breaks something.
* add a changelog
2022-09-26 15:40:20 -04:00
n5m
9ca88a1889
fix #18128 rfind on empty needle returns rightmost index ( #20430 )
...
rfind on empty needle returns haystack len
2022-09-26 15:39:22 -04:00
ringabout
b213913dcb
add a changelog and update the document for ORC ( #20415 )
...
* add a changelog and update the document for ORC
* hone
* back
* Apply suggestions from code review
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* Update doc/mm.md
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* Update doc/mm.md
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-09-26 19:32:08 +02:00
Amjad Ben Hedhili
40dae8c731
Represent more types as JS TypedArrays ( #20411 )
...
* Represent `array[N, char]` as JS `UInt8Array(N)`
* Add support distinct and range types
* Add support for bools and enums
2022-09-26 12:26:28 +02:00
Bung
e13cd40e21
fix #2614 improve error message when array of proc calling convention… ( #20379 )
...
fix #2614 improve error message when array of proc calling convention mismatch
2022-09-26 11:58:13 +02:00
Amjad Ben Hedhili
f7f375f59d
Optimize base64.encodeMime ( #20409 )
...
* Optimize `base64.encodeMime`
* 5x faster for common scenarios, 13x faster if `lineLen` <= encoded
string's length or `newLine` is empty.
* Changed `lineLen`'s type to `Positive` to disallow `0`.
* Fix
2022-09-25 15:23:23 -04:00
ringabout
30bd75e459
continue booting the compiler with refc ( #20421 )
...
* continue boot the compiler with refc
* koch
* use `gc:refc`
2022-09-24 20:14:01 +08:00
ringabout
37ca97dd76
close #15955 ; add a test case ( #20414 )
2022-09-24 01:37:21 +08:00
ringabout
7739e23420
defaults to ORC ( #19972 )
...
* defaults to Orc
* bootstrap using refc
* use gc
* init orc defines
* unregister orc
* fix gc
* fix commands
* add prepareMutation for orc
* enable deepcopy for orc
* prepareMutation
* more fixes
* some cases
* bug #20081
* partial fixes
* partial fixes
* fixes command line
* more fixes
* build Nim with refc
* use gc
* more fixes
* rstore
* orc doesn't support threadpool
* more shallowCopy
* more fixes
* fixes unsafeNew
* workarounds
* small
* more fixes
* fixes some megatest
* tcodegenbugs1 refc
* fxies megatest
* build nimble with refc
* workaround tensordsl tests
* replace shallowCopy with move
* fixes action
* workaround
* add todo
* fixes important packages
* unpublic unregisterArcOrc
* fixes cpp
* enable windows
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-09-23 13:05:05 +02:00
ringabout
47b59e4d33
fix #17351 ; switch to c++17 and remove hacks ( #20407 )
...
* fix #17351 ; switch to c++17
* remove workaround
2022-09-23 11:16:43 +02:00
Aditya Siram
be4bd8a0ed
Fixes #20348 ; only respect the recursion limit if the symbol's generic type has been generated by the compiler ( #20377 )
...
Fixes #20348
2022-09-22 14:19:36 -04:00
ringabout
db8a62d480
fixes #20285 ; prevent oid time overflow at year 2038 ( #20338 )
...
* Revert "fixes #20285 ; prevent oid time overflow at year 2038"
This reverts commit dfcdb6ec2a .
* increase time to 64 bits and clean up
* add testcase
* inline consts
* add a changelog
* fixes #20285 ; prevent oid time overflow at year 2038
2022-09-22 21:15:27 +08:00
Andrey Makarov
ae3dd759c4
Extract markdown/rst doc into separate file ( #20404 )
...
* Extract Markdown & Rst doc into separate file
This documentation should be extracted into separate file
as it's user's documentation, which can be used as a separate
utility for compiling `.md/.rst` files.
* Restructure: move markup info into markdown_rst.md
+Markdown link migration
2022-09-22 12:05:53 +02:00
Bung
2afce84616
Improve error message when instantiating generics with object constructor ( #20358 )
...
* Improve error message when instantiating generics with object constructor
* follow suggestion
* Update compiler/semobjconstr.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* Update tests/errmsgs/t19882_2.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-21 21:11:39 -04:00
Bung
de089d7fdb
contentLength default to -1 if not present ( #19835 )
...
* contentLength default to -1 if not present
* `httpclient.contentLength` changelog
2022-09-21 18:01:22 -04:00
ringabout
70c25c45d6
fixes #20397 ; fixes stylecheck regression ( #20398 )
...
* fixes #20397 ; fixes stylecheck
* add testcase
2022-09-21 15:04:33 -04:00
Judd
4133698f2d
Update manual.md ( #20394 )
...
* Update manual.md
update outdated information on `ObservableStores`.
* Update manual.md
add `base` pragma to fix the warning.
* Update doc/manual.md
accept.
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* Update manual.md
update example code.
* Update manual.md
1. more updates to help keeping readers on track.
1. fix typos.
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-21 15:00:55 -04:00
Juan Carlos
ebb1b7af23
RFC-460 implemented ( #19771 )
...
* RFC-460 implemented
* RFC-460 implemented
* RFC-460 implemented
* Fix dumb GitHub autoupdate on changelog
2022-09-21 10:37:13 +02:00
ringabout
e0c1159fb3
fixes #20391 ; make of operator work with generics for ORC ( #20395 )
2022-09-21 10:29:39 +02:00
ringabout
de70128fcc
follow up #19968 ; add more tests ( #20396 )
2022-09-20 16:14:01 -04:00
ringabout
4a1bda667c
turn nimIncrSeqV3 into deadcode ( #20388 )
2022-09-20 14:59:50 +02:00
metagn
3dc302662e
clarify distinct pointer type nil change ( #20376 )
...
* clarify distinct pointer type `nil` change
* Update changelog.md [skip ci]
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* remove extra quote [skip ci]
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-20 14:58:22 +02:00
Bung
08c02f0236
report expression has no type other than has to be used (or discarded… ( #20392 )
...
report expression has no type other than has to be used (or discarded) when typ is tyNone in discardCheck
2022-09-20 14:50:48 +02:00
Bung
a302b26e0e
fix #19882 Improve error message when instantiating generics that lac… ( #20356 )
...
* fix #19882 Improve error message when instantiating generics that lack a type
* Update tests/errmsgs/t19882.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-19 18:31:40 -04:00
Andrey Makarov
c4ba4f06f8
Markdown link migration part 2 ( #20371 )
2022-09-19 18:24:40 -04:00
Juan Carlos
2147b116a1
Add missing proc to dom ( #20378 )
...
* Add missing proc from dom
* Add missing proc from dom
* Add missing proc from dom
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-19 17:51:47 -04:00
Juan Carlos
c8000b1025
Add missing symbols to regex ( #20383 )
...
* Add missing attribute to jsre
* Add missing attribute to jsre
2022-09-19 17:47:39 -04:00
Amjad Ben Hedhili
7023176dcb
Recommend mapIt in some cases ( #20347 )
...
* Recommend `mapIt` in some cases
* Remove runnableExample
2022-09-19 17:43:46 -04:00
Amjad Ben Hedhili
7a756bfaef
Shorten JS block code ( #20370 )
2022-09-19 15:09:41 +02:00
ringabout
97259a5ab3
fixes #19713 ; Revert "Remove tlsEmulation enabled from Windows + GCC config" ( #19119 ) ( #20327 )
...
* Revert "Remove tlsEmulation enabled from Windows + GCC config (#19119 ) [backport:1.6]"
This reverts commit 77b696c2c9 .
* increase nimTlsSize to 48000
* enable for windows
* fixes tests
* fixes tlsEmulation:on
2022-09-19 09:16:54 +02:00
ringabout
f6dc30e52d
fixes Thread initializer for ARC/ORC on Macos ( #20368 )
...
* fixes Thread initializer for ARC/ORC
* another try
* fix
* use int
2022-09-16 16:35:53 -04:00
Tanguy
3a5e38ab9d
Allow custom pragma on iterators [backport] ( #20344 )
...
Allow custom pragma on iterators
2022-09-17 02:10:47 +08:00
ringabout
d44b547144
add docs to copyNimNode and copyNimTree ( #20357 )
...
* add docs to copyNimNode and copyNimTree
* Apply suggestions from code review
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-16 00:35:44 -04:00
metagn
c7ee4ab509
don't run azure on other branches either ( #20365 )
...
* don't run azure on other branches either
refs #20184
Azure is more prone to clogging & it's especially bad with the timeouts (some PRs haven't rebased).
* allow all version- branches
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
* add closing quote
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-16 10:48:47 +08:00
Judd
758598dd3e
more minor updates to manual.md ( #20360 )
...
* fix typos in manual.md
1. remove redundant `(`
1. 'System module' -> 'system module'.
* Update manual.md
"However" is not easy to understand. Suggest changing to the word into "In this version" to make the comparison explicite.
2022-09-15 22:38:06 +02:00
ringabout
cd9290818a
add testcase for #19020 ( #20363 )
2022-09-15 23:18:14 +08:00
metagn
3e83c4a168
only run github CI on latest commit of branch/PR ( #20361 )
...
based on [this](https://stackoverflow.com/a/72408109/10633874 )
2022-09-15 23:17:35 +08:00
ringabout
2b80ff2374
fixes #19104 ; peg Incorrect captures [backport:1.6] ( #20352 )
...
* fixes #19104 ; peg Incorrect captures [backport:1.6]
* add tests
Co-authored-by: khchen <khchen@gmail.com >
2022-09-15 07:54:53 +02:00
metagn
79afee868d
partial revert and redesign of #19814 , changelog ( #20341 )
...
* conservative partial revert of #19814
* fix
* revert tssl
* revert azure CI change
* keep azure, revert version range
* fully revert CI, add changelog
* useOpenssl3 as separate define, .3 is a version
2022-09-14 14:14:58 -04:00
metagn
a73ae3e066
minor improvements to follow up recent PRs ( #20342 )
...
put mOpenArrayToSeq in compile-time evaluation whitelist
(it was mNone before which was whitelisted), homogenize
"ordinal type expected" errors, put overloadable enums
in non-experimental manual
2022-09-14 18:30:15 +02:00
Andrey Makarov
2140d05f34
nimgrep: add --inContext and --notinContext options ( #19528 )
...
* nimgrep: add `--matchContext` and `--noMatchContext` options
* Rename options for uniformity
* Revise option names, add `--parentPath` options
* Revert --bin deprecation
* Copy-paste an original test from quantimnot
The origin was:
96544656d5/tnimgrep.nim
* Change ! to n
* Attempt to fix test
* Fix test on Windows
* Change --contentsFile -> --inFile, add more tests
* Bump
* Change --parentPath to --dirpath
2022-09-14 18:28:01 +02:00
Bung
08faa04d78
fix #20233 Float ranges in case statement in JS crash compiler ( #20349 )
2022-09-14 17:16:34 +02:00
ringabout
2e8c016799
disable tlsEmulation for ic tests ( #20345 )
2022-09-14 12:06:05 +08:00
Antonis Geralis
7c85b500df
Add testcase for bug #20305 ( #20323 )
...
* add testcase for bug #20305
* Update tcaseobj.nim
Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com >
2022-09-13 19:10:08 +08:00
ringabout
c9a92117f9
Revert "add fromChar" ( #20336 )
...
Revert "add `fromChar` (#20332 )"
This reverts commit 846cc746a2 .
2022-09-12 13:33:47 -04:00
Andreas Rumpf
6bf21e7b3d
fixes #19724 ; don't be aggressive when you infer sink parameters ( #20314 )
...
* fixes #19724 ; don't be aggressive when you infer sink parameters
* better logic and updated tests
* wip
* fixes tests (#20330 )
* restore tests
* try splitPath
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
* Apply suggestions from code review
* Apply suggestions from code review
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-09-12 00:58:29 +02:00
Clay Sweetser
8850644cb7
Revert "fixes #20155 ; repr range with distinct types is broken with ORC" ( #20334 )
...
Revert "fixes #20155 ; repr range with distinct types is broken with ORC (#20158 )"
This reverts commit 37b3f62eef .
2022-09-11 16:56:11 -04:00
ringabout
37b3f62eef
fixes #20155 ; repr range with distinct types is broken with ORC ( #20158 )
...
* fixes #20155 ; repr range with distinct types is broken with ORC
* skipRanges
2022-09-11 16:55:22 -04:00
random-bites
9b9f24f01b
Replace word 'param(s)' with 'parameter(s)'. ( #20331 )
...
Replace word 'params(s)' with 'parameter(s)'.
2022-09-11 16:52:56 -04:00