Nim version 2.2.2 released
05 February 2025 The Nim Team
The Nim Team is happy to announce version 2.2.2, the first patch release for our stable release, Nim 2.2.
It comes four months after the 2.2.0 release and it contains 203 commits, bringing bugfixes and improvements.
If you’re still on Nim 1.6, take a look at the version 2.0 release article to see all the features you’re missing. If you’ve been using Nim 2.0, the version 2.2 release article shows the improvements available in Nim 2.2.
Installing Nim 2.2.2
Check out if the package manager of your OS already ships version 2.2.2 or install it as described here.
If you have installed a previous version of Nim using choosenim
,
getting Nim 2.2.2 is as easy as:
$ choosenim update self
$ choosenim update stable
NOTE: Make sure that the version of choosenim you have installed is 0.8.5 or higher, otherwise visit choosenim’s repo and see there how to re-install it first, before updating Nim.
Alternatively, you can download Nim 2.2.2 from our nightlies builds.
Bugfixes
- Fixed “compiler crash on
len
ofvarargs[untyped]
” (#24258) - Fixed “Force compiler generate declaration of a type” (#19585)
- Fixed “importc types alias doesn’t work with distinct” (#18896)
- Fixed “Seg fault when adding deque element” (#24319)
- Fixed “Nested iterator doesn’t work in proc” (#3824)
- Fixed “internal error: not part of closure object type” (#19984)
- Fixed “Size/Signedness issues with unordered enums” (#23952)
- Fixed “Calling proc with nested ref/deref constructed object results in invalid generated code” (#18081)
- Fixed “
Error: VM problem: dest register is not set
withconst
-bound proc” (#24359) - Fixed “C compiler error when default initializing an object field function when the default function is overloaded” (#23545)
- Fixed “
SIGSEGV
withnim c -c
andnim e
onmacro w(): untyped = result = genSym(nskType)
” (#24379) - Fixed “build failed for lib/pure/selectors via mingw” (#24371)
- Fixed “
supportsCopyMem
can fail from macro context with tuples” (#24378) - Fixed “Stop writing
.ndi
files” (#24395) - Fixed “Array field that has array-element type with copy-protector and default value set on a field will yield error” (#24369)
- Fixed “Memory leak under Arc/Orc on inline iterators with nested seq.” (#24402)
- Fixed “new-style concept fails to match” (#24451)
- Fixed “No error checking on fclose” (#19600)
- Fixed “
let
symbol created by template is reused innimvm
branch “ (#24472) - Fixed “redundant type cast causes errors with VCC” (#24476)
- Fixed “
asyncdispatch.drain
returns before timeout even if there are pending operations” (#24506) - Fixed “ensureMove usage leading to memory leak for JsonNode !” (#24504)
- Fixed “UB calling
allocCStringArray([""])
with--mm:refc
” (#22153) - Fixed “
std/pegs
withnim cpp --mm:orc --exceptions:goto
creates invalid C++” (#22101) - Fixed “Word error” (#24538)
- Fixed “Allow, but warn on, unknown hint/warning names” (#20908)
- Fixed “building nimble 0.16.4 fails when running
build_all.sh
” (#24536) - Fixed “The compiler optimizes out unused constants marked with the
exportc
pragma” (#17681) - Fixed “Asyncdispatch leaks under –mm:arc” (#23212)
- Fixed “Nim v2 emit / asm var param dereference inconsistency” (#23114)
- Fixed “Incorrect/misleading error message with large
array
bounds” (#24599) - Fixed “
static openArray
backed byseq
cannot be passed to another function” (#24630) - Fixed “
size
pragma on type used in type imported indirectly results in inconsistent C declarations of type size” (#24623) - Fixed “nimsuggest “outline” output does not list templates” (#21923)
- Fixed “cpp compilation failure on Nim 2.2.x.” (#24658)
The complete list of changes is available here.