Nim version 2.4.2 released

The Nim Team is happy to announce version 2.4.2, the first patch release for our stable release, Nim 2.4.

It comes two weeks after the 2.4.0 release and it contains 65 commits, bringing bugfixes and improvements.

If you missed the 2.4.0 release and want to see what’s new in Nim 2.4, check this article.

Installing Nim 2.4.2

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

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

Bugfixes

  • Fixed “2.2.14 regression (?) for sameType with generics” (#26574)
  • Fixed “Regression from 2.2.12 to 2.2.14 with --noLinking:on” (#26580)
  • Fixed “parsejson: long strings compare unequal after JSON round-trip with –strings:sso” (#26597)
  • Fixed “--strings:sso: [^1] on a seq through a pointer generates invalid C (nimStrLen)” (#26593)
  • Fixed “The error for a proc that violates a proc type’s .forbids names neither the effect nor where it comes from” (#26514)
  • Fixed “std/unicode lastRune/runeStrAtPos raise IndexDefect on invalid UTF-8” (#26591)
  • Fixed “A second –mm switch leaves the first memory manager’s symbol defined” (#26610)
  • Fixed “readLine on a Windows console corrupts memory on Ctrl+C” (#26430)
  • Fixed “--mm:yrc: const with a seq of a self-referencing ref fails with “cannot evaluate at compile time: lockState”” (#26579)
  • Fixed “Link error from gcc when compile pragma is used and hotcodereloading:on” (#13367)
  • Fixed “--ic:on does not rebuild when a file read with staticRead changes” (#26614)
  • Fixed “parseIpAddress accepts IPv6 groups with more than 4 hex digits” (#26647)
  • Fixed “asm statements are emitted without volatile, so the C compiler may merge, hoist or drop them” (#26649)
  • Fixed “$ of an IpAddress compresses a single zero IPv6 group to ::” (#26658)
  • Fixed “Compile error from Clang when passing a procedural type with var return type” (#25870)
  • Fixed “const array of cstring filled in a compile-time loop: every element ends up with the last value (regression 2.2.12 -> 2.4.0)” (#26670)
  • Fixed “JS backend: uint32 multiplication and *% on int32 lose precision above 2^53” (#26656)
  • Fixed “Inconsistent defect raised in strutils::find()” (#26541)
  • Fixed “C backend: a try/except in =destroy swallows the exception already propagating through the hook” (#26661)
  • Fixed “Regressions in in-place alias detection” (#26687)
  • Fixed “std/parsexml: a large numeric character reference raises RangeDefect/OverflowDefect” (#26681)
  • Fixed “ARC/ORC: =destroy emitted before the right side of x = f(g(x)) for ref types instantiated through a static generic proc” (#26680)
  • Fixed “Regression from Nim 2.2 to Nim 2.4 with segfault with ARC/ORC destructors and -d:release” (#26707)

The complete list of changes is available here.