When I ran cargo test
, a bunch of text files were edited. For example, crates/compiler/test_mono/generated/when_on_two_values.txt
had the following changes:
procedure Num.19 (#Attr.2, #Attr.3):
- let Num.257 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
- ret Num.257;
+ let Num.256 : I64 = lowlevel NumAdd #Attr.2 #Attr.3;
+ ret Num.256;
and I don't understand why...
yeah, those tests are.. kind of broken. you can ignore them, they will not impact CI
Should we remove them?
You need to commit the changes.
These are test results from the middle phases of the compiler. The diffs provide useful information when we change some functionality, but when we add a symbol it's just noise from symbol indices changing.
Are these the tests that give different results if the compiler is built in release mode instead of debug?
These files changes don't occur with the release
profile.
we don’t run these tests in release mode, which is why they don’t get picked up CI. but yeah they would print something different in release mode. I suggest we turn them off for debug mode and only run them in release mode - cc @Folkert de Vries
that might be ok now. In the early days we were adding a lot of a lot of symbols so the tests generated a lot of noise
Aren't these test brittle then? It reminds me of testing with CSS in JS solutions that would change the outcome of the tests since class names were determined randomly. That problem got solved, so I guess we can do the same here.
Last updated: Jul 06 2025 at 12:14 UTC