Fix the position of "Grey" in colors.nim (#22358)
Update the position of "Grey" (cherry picked from commit da36888)
fixes AddressSanitizer: global-buffer-overflow in getAppFilename on w…
fixes #22387; Undefined behavior when with hash(...) (#22404)
fixes #22419; async/closure environment does not align local variables (
#22425) * fixes #22419; async/closure environment does not align local variables * Apply suggestions from code review * Update tests/align/talign.nim Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> * apply code review * update tests --------- Co-authored-by: Jacek Sieka <arnetheduck@gmail.com> (cherry picked from commit 5334dc9)
relax the parameter of ensureMove; allow let statements (#22466)
* relax the parameter of `ensureMove`; allow let statements * fixes the test (cherry picked from commit 4c89223)
When in object handles procedure call again, fixes #22474 (#22480)
Ping @narimiran please backport to the 2.0 line. (cherry picked from commit 6c4e783)
fix server caching issue causing Theme failures (#22378)
* fix server caching issue causing Theme failures * Fix tester to ignore version cache param * fix case of people using -d:nimTestsNimdocFixup * rsttester needed the same fix (cherry picked from commit 7bf7496)
fixes #22619; don't lift cursor fields in the hook calls (#22638)
fixes #22619 It causes double free for closure iterators because cursor fields are destroyed in the lifted destructors of `Env`. Besides, according to the Nim manual > In fact, cursor more generally prevents object construction/destruction pairs and so can also be useful in other contexts. At least, destruction of cursor fields might cause troubles. todo - [x] tests - [x] revert a certain old PR --------- Co-authored-by: zerbina <100542850+zerbina@users.noreply.github.com> (cherry picked from commit eb91cf9)
fixes #22262; fixes -d:useMalloc broken with --mm:none and `--thr…
Fix crash when using uninstantiated generic (#22379)
* Add test case * Add in a bounds check when accessing generic types Removes idnex out of bounds exception when comparing a generic that isn't fully instantiated (cherry picked from commit 3efabd3)
Add Linux constant SO_BINDTODEVICE (#22468)
(cherry picked from commit 1927ae7)
fixes #22481; fixes card undefined misalignment behavior (#22484)
* fixes `card` undefined misalignment behavior * Update lib/system/sets.nim --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de> (cherry picked from commit ade75a1)
fix getNullValue for cstring in VM, make other VM code aware of nil c…
Fix #21532: Check if template return is untyped (#22517)
* Don't ignore return in semTemplateDef * Add test --------- Co-authored-by: SirOlaf <> (cherry picked from commit 3de75ff)
test case haul for old generic/template/macro issues (#22564)
* test case haul for old generic/template/macro issues closes #12582, closes #19552, closes #2465, closes #4596, closes #15246, closes #12683, closes #7889, closes #4547, closes #12415, closes #2002, closes #1771, closes #5121 The test for #5648 is also moved into its own test from `types/tissues_types` due to not being joinable. * fix template gensym test (cherry picked from commit c19fd69)
newStringOfCap now won't initialize all elements anymore (#22568)
newStringOfCap nows won't initialize all elements anymore (cherry picked from commit 2e7c8a3)
Fix #22604: Make endsInNoReturn traverse the tree (#22612)
* Rewrite endsInNoReturn * Handle `try` stmt again and add tests * Fix unreachable code warning * Remove unreachable code in semexprs again * Check `it.len` before skip * Move import of assertions --------- Co-authored-by: SirOlaf <> (cherry picked from commit 3b206ed)
Exclude block from endsInNoReturn, fix regression (#22632)
Co-authored-by: SirOlaf <> (cherry picked from commit d2f36c0)
Remove some unnecessary initialization in string operations (#22579)
* `prepareAdd` * `toNimStr` * `setLengthStrV2` * `NimAsgnStrV2` * `prepareMutation` * Some cleanups (cherry picked from commit a4df44d)
Fix #17509: Continue instead of return with unfinished generics (#22563)
Close #17509 Current knowledge: - delaying cache fixes the issue - changing return of `if inst.len < key.len:` in `searchInstTypes` to `continue` fixes the issue. With return the broken types are also cached over and over Related issues are completely unaffected as of now, so there must be something deeper. I am also still trying to find the true cause, so feel free to ignore for now --------- Co-authored-by: SirOlaf <> (cherry picked from commit ee4a219)
Initialize newString in js [backport:1.6] (#22745)
```nim
echo newString(8)
```
results in:
```
D:\User\test.js:25
var code_33556944 = c_33556931.toString(16);
^
TypeError: Cannot read properties of undefined (reading 'toString')
at toJSStr (D:\User\test.js:25:50)
at rawEcho (D:\User\test.js:70:16)
at Object.<anonymous> (D:\User\test.js:101:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
Node.js v17.0.1
Error: execution of an external program failed: '"C:\Program Files\nodejs\node.exe" --unhandled-rejections=strict D:\User\test.js'
```
(cherry picked from commit eadd0d7)1. `freeAddrInfo` is called prematurely, the variable `myAddr` is still in use 2. Use defer syntax to ensure that `freeAddrInfo` is also called on exceptions (cherry picked from commit 562a5fb)
bump node to 20.x; since 16.x is End-of-Life (#22892)
(cherry picked from commit f61311f)
update test command of important packages (#22485)
(cherry picked from commit 9296b45)
deprecate std/threadpool; use malebolgia, weave, nim-taskpool…
(cherry picked from commit dfb3a88)
add union to packages (#22658)
(cherry picked from commit 009ce1e)
switch back to main neo in CI (#22660)
refs andreaferretti/neo#53 (cherry picked from commit b9f039e)
(cherry picked from commit 46544f2)
iNim switch to the official URL (#22762)
ref inim-repl/INim#139 (cherry picked from commit 02ba28e)
Inlay hints backport to Nim v2.0.x (#22919)
Backport of the nimsuggest inlay hints to the Nim v2.0.x series.