Commits on Aug 11, 2023

  1. bump NimVersion to 2.0.1

    narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    d1db4c2 View commit details
    Browse the repository at this point in the history
  2. Fix the position of "Grey" in colors.nim (#22358)

    Update the position of "Grey"
    
    (cherry picked from commit da36888)
    MichalMarsalek authored and narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    1de6a7a View commit details
    Browse the repository at this point in the history
  3. fixes AddressSanitizer: global-buffer-overflow in getAppFilename on w…

    …indows 10 (#22380)
    
    fixes AddressSanitizer: global-buffer-overflow
    
    (cherry picked from commit 73a29d7)
    norrath-hero-cn authored and narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    e0e3863 View commit details
    Browse the repository at this point in the history
  4. block ambiguous type conversion dotcalls in generics (#22375)

    fixes #22373
    
    (cherry picked from commit 3aaef9e)
    metagn authored and narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    f553288 View commit details
    Browse the repository at this point in the history
  5. fixes #22387; Undefined behavior when with hash(...) (#22404)

    * fixes #22387; Undefined behavior when with hash(...)
    
    * fixes vm
    
    * fixes nimscript
    
    (cherry picked from commit 47d06d3)
    ringabout authored and narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    287fbc5 View commit details
    Browse the repository at this point in the history
  6. 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)
    2 people authored and narimiran committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    037f536 View commit details
    Browse the repository at this point in the history

Commits on Aug 22, 2023

  1. Configuration menu
    Copy the full SHA
    4850bb5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3fa3785 View commit details
    Browse the repository at this point in the history
  3. 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)
    ringabout authored and narimiran committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    c3425c0 View commit details
    Browse the repository at this point in the history
  4. When in object handles procedure call again, fixes #22474 (#22480)

    Ping @narimiran please backport to the 2.0 line.
    
    (cherry picked from commit 6c4e783)
    beef331 authored and narimiran committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    8359f96 View commit details
    Browse the repository at this point in the history
  5. fixes #22357; don't sink elements of var tuple cursors (#22486)

    (cherry picked from commit 940b160)
    ringabout authored and narimiran committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    0a58af8 View commit details
    Browse the repository at this point in the history
  6. 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)
    DanielBelmes authored and narimiran committed Aug 22, 2023
    Configuration menu
    Copy the full SHA
    ef63d47 View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2023

  1. define toList procs after add for lists [backport] (#22573)

    fixes #22543
    
    (cherry picked from commit 94454ad)
    metagn authored and narimiran committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    f03aa1d View commit details
    Browse the repository at this point in the history
  2. 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)
    2 people authored and narimiran committed Sep 5, 2023
    Configuration menu
    Copy the full SHA
    18e62ad View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2023

  1. produce better code for object constructions and 'result' [backport] (#…

    …22668)
    
    (cherry picked from commit 8f5b90f)
    Araq authored and narimiran committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    1080f5e View commit details
    Browse the repository at this point in the history
  2. Make capacity work with refc [backport] (#22697)

    followup of #19771.
    
    (cherry picked from commit 3253418)
    AmjadHD authored and narimiran committed Sep 14, 2023
    Configuration menu
    Copy the full SHA
    81d58d2 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2023

  1. fixes #22262; fixes -d:useMalloc broken with --mm:none and `--thr…

    …eads on` (#22355)
    
    * fixes #22262; -d:useMalloc broken with --mm:none and threads on
    
    * fixes
    
    (cherry picked from commit a23e53b)
    ringabout authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    4a7cdae View commit details
    Browse the repository at this point in the history
  2. 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)
    ire4ever1190 authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    7221c6f View commit details
    Browse the repository at this point in the history
  3. Fix #5780 (#22428)

    * fix #5780
    
    (cherry picked from commit 46e94c8)
    bung87 authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    106cf7a View commit details
    Browse the repository at this point in the history
  4. Add Linux constant SO_BINDTODEVICE (#22468)

    (cherry picked from commit 1927ae7)
    Emery Hemingway authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    320ecc6 View commit details
    Browse the repository at this point in the history
  5. 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)
    2 people authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    562fb0d View commit details
    Browse the repository at this point in the history
  6. fix getNullValue for cstring in VM, make other VM code aware of nil c…

    …string (#22527)
    
    * fix getNullValue for cstring in VM
    
    fixes #22524
    
    * very ugly fixes, but fix #15730
    
    * nil cstring len works, more test lines
    
    * fix high
    
    (cherry picked from commit 942f846)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    5fa48e9 View commit details
    Browse the repository at this point in the history
  7. 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)
    SirOlaf authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    4cf2658 View commit details
    Browse the repository at this point in the history
  8. fixes #22541; peg matchLen can raise an unlisted exception: Exception (

    …#22545)
    
    The `mopProc` is a recursive function.
    
    (cherry picked from commit c56a712)
    ringabout authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    d46e71b View commit details
    Browse the repository at this point in the history
  9. 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)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    87c1200 View commit details
    Browse the repository at this point in the history
  10. newStringOfCap now won't initialize all elements anymore (#22568)

    newStringOfCap nows won't initialize all elements anymore
    
    (cherry picked from commit 2e7c8a3)
    ringabout authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    ba8c9a9 View commit details
    Browse the repository at this point in the history
  11. correct logic for qualified symbol in templates (#22577)

    * correct logic for qualified symbol in templates
    
    fixes #19865
    
    * add test
    
    (cherry picked from commit 3de8d75)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    7ab0f3b View commit details
    Browse the repository at this point in the history
  12. clearer error for different size int/float cast in VM (#22582)

    refs #16547
    
    (cherry picked from commit b6cea7b)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    855f5c8 View commit details
    Browse the repository at this point in the history
  13. handle typedesc params in VM (#22581)

    * handle typedesc params in VM
    
    fixes #15760
    
    * add test
    
    * fix getType(typedesc) test
    
    (cherry picked from commit 2e4e2f8)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    78d4aa3 View commit details
    Browse the repository at this point in the history
  14. fixes #17197; fixes #22560; fixes the dest of newSeqOfCap in refc (#2…

    …2594)
    
    (cherry picked from commit 5bd1afc)
    ringabout authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    b477c2a View commit details
    Browse the repository at this point in the history
  15. 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)
    SirOlaf authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    d3cf815 View commit details
    Browse the repository at this point in the history
  16. unify explicit generic param semchecking in calls (#22618)

    fixes #9040
    
    (cherry picked from commit 6738f44)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    ee0d3f9 View commit details
    Browse the repository at this point in the history
  17. use dummy dest for void branches to fix noreturn in VM (#22617)

    fixes #22216
    
    (cherry picked from commit 2542dc0)
    metagn authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    7536d7f View commit details
    Browse the repository at this point in the history
  18. Exclude block from endsInNoReturn, fix regression (#22632)

    Co-authored-by: SirOlaf <>
    (cherry picked from commit d2f36c0)
    SirOlaf authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    9ad1848 View commit details
    Browse the repository at this point in the history
  19. Remove some unnecessary initialization in string operations (#22579)

    * `prepareAdd`
    * `toNimStr`
    * `setLengthStrV2`
    * `NimAsgnStrV2`
    * `prepareMutation`
    * Some cleanups
    
    (cherry picked from commit a4df44d)
    AmjadHD authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    5c916b6 View commit details
    Browse the repository at this point in the history
  20. 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)
    SirOlaf authored and narimiran committed Sep 18, 2023
    Configuration menu
    Copy the full SHA
    d30565f View commit details
    Browse the repository at this point in the history

Commits on Oct 24, 2023

  1. 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)
    AmjadHD authored and narimiran committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    75441dc View commit details
    Browse the repository at this point in the history
  2. fix #22834 (#22843)

    fix #22834
    
    Edit: also fixes `result.addrList` when IPv6, which previously only
    performed a `result.addrList = cstringArrayToSeq(s.h_addr_list)` which
    does not provide the textual representation of an IPv6
    
    (cherry picked from commit 27deace)
    rockcavera authored and narimiran committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    e8e9948 View commit details
    Browse the repository at this point in the history
  3. fix use after free (#22854)

    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)
    haoyu234 authored and narimiran committed Oct 24, 2023
    Configuration menu
    Copy the full SHA
    805b4e2 View commit details
    Browse the repository at this point in the history

Commits on Oct 29, 2023

  1. fixes #22868; fixes std/nre leaks under ARC/ORC (#22872)

    fixes #22868
    
    (cherry picked from commit d66f3fe)
    ringabout authored and narimiran committed Oct 29, 2023
    Configuration menu
    Copy the full SHA
    1db305a View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2023

  1. bump node to 20.x; since 16.x is End-of-Life (#22892)

    (cherry picked from commit f61311f)
    ringabout authored and narimiran committed Oct 31, 2023
    Configuration menu
    Copy the full SHA
    f4e80d5 View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2023

  1. fixes #22866; fixes #19998; ensure destruction for Object constructio…

    …n with custom destructors (#22901)
    
    fixes #22866;
    fixes #19998
    
    (cherry picked from commit b68e0aa)
    ringabout authored and narimiran committed Nov 2, 2023
    Configuration menu
    Copy the full SHA
    86e5545 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2023

  1. update test command of important packages (#22485)

    (cherry picked from commit 9296b45)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    6d32066 View commit details
    Browse the repository at this point in the history
  2. deprecate std/threadpool; use malebolgia, weave, nim-taskpool

    … instead (#22576)
    
    * deprecate `std/threadpool`; use `malebolgia` instead
    
    * Apply suggestions from code review
    
    * Apply suggestions from code review
    
    * change the URL of inim
    
    (cherry picked from commit a7a0105)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    30dad5d View commit details
    Browse the repository at this point in the history
  3. fixes yaml tests (#22595)

    (cherry picked from commit dfb3a88)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    9e08157 View commit details
    Browse the repository at this point in the history
  4. add union to packages (#22658)

    (cherry picked from commit 009ce1e)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    1dc8580 View commit details
    Browse the repository at this point in the history
  5. switch back to main neo in CI (#22660)

    refs andreaferretti/neo#53
    
    (cherry picked from commit b9f039e)
    metagn authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    1b80f71 View commit details
    Browse the repository at this point in the history
  6. fixes stint CI (#22756)

    (cherry picked from commit 46544f2)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    194d21a View commit details
    Browse the repository at this point in the history
  7. iNim switch to the official URL (#22762)

    ref inim-repl/INim#139
    
    (cherry picked from commit 02ba28e)
    ringabout authored and narimiran committed Nov 8, 2023
    Configuration menu
    Copy the full SHA
    e1b4466 View commit details
    Browse the repository at this point in the history

Commits on Nov 9, 2023

  1. Inlay hints backport to Nim v2.0.x (#22919)

    Backport of the nimsuggest inlay hints to the Nim v2.0.x series.
    nickysn authored Nov 9, 2023
    Configuration menu
    Copy the full SHA
    4793fc0 View commit details
    Browse the repository at this point in the history