|
| 1 | +--- |
| 2 | +title: "Nim versions 2.2.4 and 2.0.16 released" |
| 3 | +author: The Nim Team |
| 4 | +--- |
| 5 | + |
| 6 | +The Nim Team is happy to announce two releases: |
| 7 | +- version 2.2.4, a second patch release for the latest stable version |
| 8 | +- version 2.0.16, an eight patch release for Nim 2.0 |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | +Nim v2.2.4 comes two and a half months after the v2.2.2 release and it contains [108 commits](https://github.com/nim-lang/Nim/compare/v2.2.2...v2.2.4) bringing bugfixes and improvements. |
| 13 | + |
| 14 | +If you're still using Nim v2.0, the v2.0.16 release brings [31 commits](https://github.com/nim-lang/Nim/compare/v2.0.14...v2.0.16) with bugfixes. |
| 15 | +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.\ |
| 16 | +Here is the [version 2.2 release article](https://nim-lang.org/blog/2024/10/02/nim-220-2010.html), showing the improvements available in Nim 2.2. |
| 17 | + |
| 18 | +The Nim 2.2.4 changelog is available [here](https://github.com/nim-lang/Nim/blob/v2.2.4/changelog.md). |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | +## Installing Nim 2.2.4 |
| 25 | + |
| 26 | + |
| 27 | +Check out if the package manager of your OS already ships version 2.2.4 or |
| 28 | +install it as described [here](https://nim-lang.org/install.html). |
| 29 | + |
| 30 | +If you have installed a previous version of Nim using `choosenim`, |
| 31 | +getting Nim 2.2.4 is as easy as: |
| 32 | + |
| 33 | +```bash |
| 34 | +$ choosenim update self |
| 35 | +$ choosenim update stable |
| 36 | +``` |
| 37 | + |
| 38 | +**NOTE:** Make sure that the version of choosenim you have installed is 0.8.5 or higher, otherwise visit [choosenim's repo](https://github.com/nim-lang/choosenim) and see there how to re-install it first, before updating Nim. |
| 39 | + |
| 40 | +Alternatively, you can download Nim 2.2.4 from |
| 41 | +[our nightlies builds](https://github.com/nim-lang/nightlies/releases/tag/2025-04-22-version-2-2-f7145dd26efeeeb6eeae6fff649db244d81b212d). |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | +## Bugfixes |
| 49 | + |
| 50 | +### Nim 2.2.4 |
| 51 | + |
| 52 | +- Fixed "A "divmod" call fails to compile with operands whose types have a non negative lower bound." |
| 53 | + ([#24673](https://github.com/nim-lang/Nim/issues/24673)) |
| 54 | +- Fixed "Adding a string to itself causes the resulting length to be off by one" |
| 55 | + ([#24664](https://github.com/nim-lang/Nim/issues/24664)) |
| 56 | +- Fixed "Invalid `=sink` generated for pure inheritable object" |
| 57 | + ([#24725](https://github.com/nim-lang/Nim/issues/24725)) |
| 58 | +- Fixed "Mangling wrong for `static` parameters" |
| 59 | + ([#24705](https://github.com/nim-lang/Nim/issues/24705)) |
| 60 | +- Fixed "`Error: identifier expected, but found '(0, 0)[0]'` with `let _ = ` in `for _ in r.fields`" |
| 61 | + ([#24339](https://github.com/nim-lang/Nim/issues/24339)) |
| 62 | +- Fixed "`{.gcsafe.}` block breaks move analysis" |
| 63 | + ([#24754](https://github.com/nim-lang/Nim/issues/24754)) |
| 64 | +- Fixed "Thread local not registed as GC root when `=destroy` exists (refc)" |
| 65 | + ([#24770](https://github.com/nim-lang/Nim/issues/24770)) |
| 66 | +- Fixed "sign of `NaN` differs in CT & RT" |
| 67 | + ([#24772](https://github.com/nim-lang/Nim/issues/24772)) |
| 68 | +- Fixed "`setjmp` on linux mangles `ebp` leading to early collection" |
| 69 | + ([#10625](https://github.com/nim-lang/Nim/issues/10625)) |
| 70 | +- Fixed "Invalid C code generation in ORC with methods, a case object, and std/options" |
| 71 | + ([#24801](https://github.com/nim-lang/Nim/issues/24801)) |
| 72 | +- Fixed "weird SIGSEV with scopes and seqs" |
| 73 | + ([#24806](https://github.com/nim-lang/Nim/issues/24806)) |
| 74 | +- Fixed "macro-generated `if`/`else` and `when`/`else` statements have mismatched indentation with `repr`" |
| 75 | + ([#24850](https://github.com/nim-lang/Nim/issues/24850)) |
| 76 | +- Fixed "cross-module `sink` analysis broken" |
| 77 | + ([#24764](https://github.com/nim-lang/Nim/issues/24764)) |
| 78 | +- Fixed "Data getting wiped on copy with iterators and `=copy` on refc" |
| 79 | + ([#24879](https://github.com/nim-lang/Nim/issues/24879)) |
| 80 | +- Fixed "`build_all.sh` koch tools fails to build atlas" |
| 81 | + ([#24881](https://github.com/nim-lang/Nim/issues/24881)) |
| 82 | +- Fixed "doc: `export` for imported symbols are not generated document." |
| 83 | + ([#24890](https://github.com/nim-lang/Nim/issues/24890)) |
| 84 | + |
| 85 | +The complete list of changes is available [here](https://github.com/nim-lang/Nim/compare/v2.2.2...v2.2.4). |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | +### Nim 2.0.16 |
| 92 | + |
| 93 | +- Fixed "`static openArray` backed by `seq` cannot be passed to another function" |
| 94 | + ([#24630](https://github.com/nim-lang/Nim/issues/24630)) |
| 95 | +- Fixed "`size` pragma on type used in type imported indirectly results in inconsistent C declarations of type size" |
| 96 | + ([#24623](https://github.com/nim-lang/Nim/issues/24623)) |
| 97 | +- Fixed "Bad codegen when casting procs" |
| 98 | + ([#5901](https://github.com/nim-lang/Nim/issues/5901)) |
| 99 | +- Fixed "Copy hook causes an `incompatible-pointer-types` warning/error in GCC 14 with subclassed objects" |
| 100 | + ([#24147](https://github.com/nim-lang/Nim/issues/24147)) |
| 101 | +- Fixed "Thread local not registed as GC root when `=destroy` exists (refc)" |
| 102 | + ([#24770](https://github.com/nim-lang/Nim/issues/24770)) |
| 103 | +- Fixed "`setjmp` on linux mangles `ebp` leading to early collection" |
| 104 | + ([#10625](https://github.com/nim-lang/Nim/issues/10625)) |
| 105 | +- Fixed "Invalid C code generation in ORC with methods, a case object, and std/options" |
| 106 | + ([#24801](https://github.com/nim-lang/Nim/issues/24801)) |
| 107 | +- Fixed "macro-generated `if`/`else` and `when`/`else` statements have mismatched indentation with `repr`" |
| 108 | + ([#24850](https://github.com/nim-lang/Nim/issues/24850)) |
| 109 | + |
| 110 | +The complete list of changes is available [here](https://github.com/nim-lang/Nim/compare/v2.0.14...v2.0.16). |
0 commit comments