Stream: contributing

Topic: Edited Text Files when Testing


view this post on Zulip Chris Duncan (Oct 09 2022 at 20:23):

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...

view this post on Zulip Ayaz Hafiz (Oct 09 2022 at 20:49):

yeah, those tests are.. kind of broken. you can ignore them, they will not impact CI

view this post on Zulip Chris Duncan (Oct 09 2022 at 21:05):

Should we remove them?

view this post on Zulip Brian Carroll (Oct 10 2022 at 06:15):

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.

view this post on Zulip Brendan Hansknecht (Oct 10 2022 at 06:21):

Are these the tests that give different results if the compiler is built in release mode instead of debug?

view this post on Zulip Chris Duncan (Oct 10 2022 at 11:57):

These files changes don't occur with the release profile.

view this post on Zulip Ayaz Hafiz (Oct 10 2022 at 13:07):

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

view this post on Zulip Folkert de Vries (Oct 10 2022 at 19:43):

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

view this post on Zulip Chris Duncan (Oct 10 2022 at 20:24):

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