Nim versions 2.2.4 and 2.0.16 released

The Nim Team is happy to announce two releases:

  • version 2.2.4, a second patch release for the latest stable version
  • version 2.0.16, an eight patch release for Nim 2.0

Nim v2.2.4 comes two and a half months after the v2.2.2 release and it contains 108 commits bringing bugfixes and improvements.

If you’re still using Nim v2.0, the v2.0.16 release brings 31 commits with bugfixes. But we would encourage you to switch to Nim v2.2, as it brings significant improvements to the ORC memory management and to the language and the compiler overall.
Here is the version 2.2 release article, showing the improvements available in Nim 2.2.

The Nim 2.2.4 changelog is available here.

Installing Nim 2.2.4

Check out if the package manager of your OS already ships version 2.2.4 or install it as described here.

If you have installed a previous version of Nim using choosenim, getting Nim 2.2.4 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.4 from our nightlies builds.

Bugfixes

Nim 2.2.4

  • Fixed “A “divmod” call fails to compile with operands whose types have a non negative lower bound.” (#24673)
  • Fixed “Adding a string to itself causes the resulting length to be off by one” (#24664)
  • Fixed “Invalid =sink generated for pure inheritable object” (#24725)
  • Fixed “Mangling wrong for static parameters” (#24705)
  • Fixed “Error: identifier expected, but found '(0, 0)[0]' with let _ = in for _ in r.fields” (#24339)
  • Fixed “{.gcsafe.} block breaks move analysis” (#24754)
  • Fixed “Thread local not registed as GC root when =destroy exists (refc)” (#24770)
  • Fixed “sign of NaN differs in CT & RT” (#24772)
  • Fixed “setjmp on linux mangles ebp leading to early collection” (#10625)
  • Fixed “Invalid C code generation in ORC with methods, a case object, and std/options” (#24801)
  • Fixed “weird SIGSEV with scopes and seqs” (#24806)
  • Fixed “macro-generated if/else and when/else statements have mismatched indentation with repr” (#24850)
  • Fixed “cross-module sink analysis broken” (#24764)
  • Fixed “Data getting wiped on copy with iterators and =copy on refc” (#24879)
  • Fixed “build_all.sh koch tools fails to build atlas” (#24881)
  • Fixed “doc: export for imported symbols are not generated document.” (#24890)

The complete list of changes is available here.

 

Nim 2.0.16

  • Fixed “static openArray backed by seq 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 “Bad codegen when casting procs” (#5901)
  • Fixed “Copy hook causes an incompatible-pointer-types warning/error in GCC 14 with subclassed objects” (#24147)
  • Fixed “Thread local not registed as GC root when =destroy exists (refc)” (#24770)
  • Fixed “setjmp on linux mangles ebp leading to early collection” (#10625)
  • Fixed “Invalid C code generation in ORC with methods, a case object, and std/options” (#24801)
  • Fixed “macro-generated if/else and when/else statements have mismatched indentation with repr” (#24850)

The complete list of changes is available here.