sbt / zinc

Scala incremental compiler library, used by sbt and other build tools
Apache License 2.0
335 stars 121 forks source link

[2.x] Add tests for #1430 (content hash) #1441

Open Friendseeker opened 1 month ago

Friendseeker commented 1 month ago

While #1430 passed regression testing, we still need to add more testing to verify it produces correct, machine-independent hash.

We can probably pin a scala version, store a known correct hash for a source file in a variable and test that the source file hash does not change throughout incremental compilation. Need to test for both macro & non macro files.

Some scripted test involving adding a comment to a macro (or upstream of a macro) and asserting no downstream compilation would also be good test to add.

Friendseeker commented 3 weeks ago

Thinking again I feel #1430 may have weird interaction with pipelining. The scripted test about pipelining passed, but there's still the issue that we are only hashing early product instead of final product.