You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a library and have a crude compile-time test system set up. I run the test and it compiles a bunch of snippets and compares the actual compiled output (declarations and errors) to the expected compiled output.
However, I've noticed that, every once in a while, when adding new features, the compiled output changes like in the above screenshot. The output isn't wrong per se. It's correct but adding a new file shouldn't change the compiled output (in my opinion).
It's just shuffling the elements of the union types in the error messages.
When the output does change, I just accept the change and subsequent compiles match the new output. So, I know the compile output is deterministic. It just seems like adding a new file and not modifying every other file has the possibility of changing the compile output... Of code that doesn't use the new file.
The order or types in members is determined by those types IDs. Type IDs are assigned on a first-checked basis. So adding a file can cause they type to be checked sooner and thus it's order in a union change.
I'm writing a library and have a crude compile-time test system set up. I run the test and it compiles a bunch of snippets and compares the actual compiled output (declarations and errors) to the expected compiled output.
However, I've noticed that, every once in a while, when adding new features, the compiled output changes like in the above screenshot. The output isn't wrong per se. It's correct but adding a new file shouldn't change the compiled output (in my opinion).
It's just shuffling the elements of the union types in the error messages.
When the output does change, I just accept the change and subsequent compiles match the new output. So, I know the compile output is deterministic. It just seems like adding a new file and not modifying every other file has the possibility of changing the compile output... Of code that doesn't use the new file.
I guess my question is "Why is it doing this?"
Below is how I'm compiling the snippets,
The text was updated successfully, but these errors were encountered: