Open milessabin opened 5 years ago
You could borrow parts of https://github.com/scala/scala/blob/2.13.x/test/junit/scala/tools/nsc/DeterminismTest.scala, in which I compile a set of source files in different orders/subsets and check bytecode is identical.
I wrote http://github.com/scala/jardiff to automate the process of bytecode decompilation and diffing, which is handy when to diagnose test failures.
Comment from @retronym on https://github.com/playframework/play-json/pull/263,
I think we're already in pretty good shape here, at the very least we've always sorted the output of
knownDirectSubclasses
, and I don't think there's anywhere where map/set iteration order would be relevant. But it would be good to make absolutely sure of this.@retronym if you have any advice on how to test for (non-)determinism as part of the build they would be very welcome.