<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Nim, branch devel</title>
<subtitle>This repository contains the Nim compiler, Nim's stdlib, tools, and documentation. (mirror)</subtitle>
<id>https://git.tilde.institute/ahoang/Nim/atom?h=devel</id>
<link rel='self' href='https://git.tilde.institute/ahoang/Nim/atom?h=devel'/>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/'/>
<updated>2024-10-03T18:39:55Z</updated>
<entry>
<title>stricter set type match, implicit conversion for literals (#24176)</title>
<updated>2024-10-03T18:39:55Z</updated>
<author>
<name>metagn</name>
<email>metagngn@gmail.com</email>
</author>
<published>2024-10-03T18:39:55Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=7dfadb8b4e95d09981fbeb01d85b12f23946c3e7'/>
<id>urn:sha1:7dfadb8b4e95d09981fbeb01d85b12f23946c3e7</id>
<content type='text'>
fixes #18396, fixes #20142

Set types with base types matching less than a generic match (so
subrange matches, conversion matches, int conversion matches) are now
considered mismatching, as their representation is different on the
backends (except VM and JS), causing codegen issues. An exception is
granted for set literal types, which now implicitly convert each element
to the matched base type, so things like `s == {'a', 'b'}` are still
possible where `s` is `set[range['a'..'z']]`. Also every conversion
match in this case is unified under the normal "conversion" match, so a
literal doesn't match one set type better than the other, unless it's
equal.

However `{'a', 'b'} == s` or `{'a', 'b'} - s` etc is now not possible.
when it used to work in the VM. So this is somewhat breaking, and needs
a changelog entry.</content>
</entry>
<entry>
<title>don't typecheck `untyped` + allow void `typed` template param default values (#24219)</title>
<updated>2024-10-03T18:38:42Z</updated>
<author>
<name>metagn</name>
<email>metagngn@gmail.com</email>
</author>
<published>2024-10-03T18:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=4eed341ba53e69674d7e8e8a609efd1ea0a54b4b'/>
<id>urn:sha1:4eed341ba53e69674d7e8e8a609efd1ea0a54b4b</id>
<content type='text'>
Previously, the compiler never differentiated between `untyped`/`typed`
argument default values and other types, it considered any parameter
with a type as typed and called `semExprWithType`, which both
typechecked it and disallowed `void` expressions. Now, we perform no
typechecking at all on `untyped` template param default values, and call
`semExpr` instead for `typed` params, which allows expressions with
`void` type.</content>
</entry>
<entry>
<title>don't construct array type for already typed `nkBracket` node (#24224)</title>
<updated>2024-10-03T17:35:53Z</updated>
<author>
<name>metagn</name>
<email>metagngn@gmail.com</email>
</author>
<published>2024-10-03T17:35:53Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=d98ef312f0cf8745d39c940b16d8d2dce1dfa70f'/>
<id>urn:sha1:d98ef312f0cf8745d39c940b16d8d2dce1dfa70f</id>
<content type='text'>
fixes #23010, split from #24195

When resemming bracket nodes, the compiler currently unconditionally
makes a new node with an array type based on the node. However the VM
can generate bracket nodes with `seq` types, which this erases. To fix
this, if a bracket node already has a type, we still resem the bracket
node, but don't construct a new type for it, instead using the type of
the original node.

A version of this was rejected that didn't resem the node at all if it
was typed, but I can't find it. The difference with this one is that the
individual elements are still resemmed.

This should fix the break caused by #24184 so we could redo it after
this PR but it might still have issues, not to mention the related
pre-existing issues like #22793, #12559 etc.</content>
</entry>
<entry>
<title>use cbuilder for seq type generation (#24202)</title>
<updated>2024-10-03T17:35:21Z</updated>
<author>
<name>metagn</name>
<email>metagngn@gmail.com</email>
</author>
<published>2024-10-03T17:35:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=89978b48baeed0c745d45d666a9786c8d9457581'/>
<id>urn:sha1:89978b48baeed0c745d45d666a9786c8d9457581</id>
<content type='text'>
`addSimpleStruct` is just so the compiler doesn't use so much extra
computation on analyzing the `typ` parameter for `addStruct`, which
doesn't change anything for `seq` types. We could probably still get
away with using `addStruct` instead, or making `addStruct` accept `nil`
as the `typ` argument but this would be even more computation.

There were a lot of hidden issues with `addStruct` being a template &amp;
template argument substitution, so most of the behavior is moved into
`startStruct`/`finishStruct` procs.

This is turning out to be a lot of code for just a couple of changed
lines, we might have to split `cbuilder` into multiple modules.</content>
</entry>
<entry>
<title>bump NimVersion to 2.2.1 (#24215)</title>
<updated>2024-10-02T20:02:17Z</updated>
<author>
<name>Miran</name>
<email>narimiran@disroot.org</email>
</author>
<published>2024-10-02T20:02:17Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=d6a71a10671b66ee4f5be09f99234b3d834e7fce'/>
<id>urn:sha1:d6a71a10671b66ee4f5be09f99234b3d834e7fce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>improve error messages for illegalCapture (#24214)</title>
<updated>2024-10-02T16:25:59Z</updated>
<author>
<name>ringabout</name>
<email>43030857+ringabout@users.noreply.github.com</email>
</author>
<published>2024-10-02T16:25:59Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=f7cb0322c2d7939398a064d2f31b63ed8902b1c6'/>
<id>urn:sha1:f7cb0322c2d7939398a064d2f31b63ed8902b1c6</id>
<content type='text'>
ref https://forum.nim-lang.org/t/12536

Use a general recommendation to avoid some weird error messages like
`&lt;ref ref var Test&gt;` etc.</content>
</entry>
<entry>
<title>update the changelog (#24213)</title>
<updated>2024-10-01T20:22:30Z</updated>
<author>
<name>Miran</name>
<email>narimiran@disroot.org</email>
</author>
<published>2024-10-01T20:22:30Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=78983f1876726a49c69d65629ab433ea1310ece1'/>
<id>urn:sha1:78983f1876726a49c69d65629ab433ea1310ece1</id>
<content type='text'>
</content>
</entry>
<entry>
<title>check fileExists for outputFile (#24211)</title>
<updated>2024-10-01T06:11:07Z</updated>
<author>
<name>ringabout</name>
<email>43030857+ringabout@users.noreply.github.com</email>
</author>
<published>2024-10-01T06:11:07Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=0e1df88f7ebb97a807a4d3d3a3d8d49b6e15c4fd'/>
<id>urn:sha1:0e1df88f7ebb97a807a4d3d3a3d8d49b6e15c4fd</id>
<content type='text'>
ref
https://github.com/nim-lang/Nim/commit/a5f46a72ba7ce074c2b32f25eaac35bba6dbe744#commitcomment-147402726</content>
</entry>
<entry>
<title>bump NimVersion to 2.2.0 (#24210)</title>
<updated>2024-09-30T18:59:38Z</updated>
<author>
<name>Miran</name>
<email>narimiran@disroot.org</email>
</author>
<published>2024-09-30T18:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=a5f46a72ba7ce074c2b32f25eaac35bba6dbe744'/>
<id>urn:sha1:a5f46a72ba7ce074c2b32f25eaac35bba6dbe744</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fixes #24008; triggers a recompilation on output executables changes when switching release/debug modes (#24193)</title>
<updated>2024-09-30T18:55:47Z</updated>
<author>
<name>ringabout</name>
<email>43030857+ringabout@users.noreply.github.com</email>
</author>
<published>2024-09-30T18:55:47Z</published>
<link rel='alternate' type='text/html' href='https://git.tilde.institute/ahoang/Nim/commit/?id=4974baf7fa74b3f439672f2f319df588774b1a85'/>
<id>urn:sha1:4974baf7fa74b3f439672f2f319df588774b1a85</id>
<content type='text'>
fixes #24008

The old logic didn't check the contents of the output executables, when
it switched release-&gt;debug-&gt;release, it picked up the Json files used in
the first release building, the content of which didn't change. So it
mistook the executables which are built by the second debug building as
the functioning one.

`changeDetectedViaJsonBuildInstructions` needs a way to distinguish the
executables generated by different buildings.</content>
</entry>
</feed>
