Open tom-englert opened 2 years ago
I suppose I'm surprised it becomes stable after the first. I could understand each Write
generating a new MVID (in fact, arguably it should, just like recompiling does even though everything else remains the same).
I could understand each
Write
generating a new MVID (in fact, arguably it should, just like recompiling does even though everything else remains the same).
The MVID can be made deterministic. See #810.
As per @ltrzesniewski comment - you need to ask for deterministic behavior. But if you still get different outputs after that I would be very interested (as it would break lot of things in our usage potentially).
Interesting. Thanks for the test @tom-englert. Did you have a chance to look at what's happening?
I once tried to dig through the code, but gave up.
I remember for one experiment that there were some blocks shifted in the file, and an empty block with only 00 had appeared after the second save
However in the test that I've added in #860 the difference is more subtle:
Looks like it's not the MVID that changes.
Given that second file has a high(ish) value at the start makes me wonder if there's a static or instance field somewhere that does not get reset.
Calling
ModuleDefinition.Write
multiple times generates different outputs. The first output is binary different from all subsequent outputs.This is not a blocking issue, since both outputs seem to work fine, but might be a hint to some inconsistency in the write operation.