Missing invalidation when deleting source file
lrytz opened this issue · comments
Zinc misses an invalidation when deleting a source file.
The issue shows up with an existing test case in the zinc repo: https://github.com/sbt/zinc/tree/develop/zinc/src/sbt-test/source-dependencies/empty-package.
For some reason, the test passes when it runs with zinc's scripted
implementation. It fails when reproducing it in a small sbt project (make sure to set incOptions := incOptions.value.withRecompileAllFraction(1.0)
), or when running it with sbt's scripted
implementation (used in scala/scala).
To reproduce it using scala/scala:
- Check out this branch https://github.com/lrytz/scala/tree/missing-invalidation
- Run
set sbtTest/scriptedBufferLog := false
andset ThisBuild / Compile / packageDoc / publishArtifact := false
in sbt - Run
sbtTest/scripted source-dependencies/empty-package
Output from the scala/scala test: https://gist.github.com/lrytz/61930adc6ed4f7d0648bbc1abf3b0bef
For reference, output when running the test in the zinc repo: https://gist.github.com/lrytz/e42076ecadc49c770465f97c12a0602b
The issue reproduces with 2.13.12, older 2.13 releases, and also with 2.12.18 and 3.3.1. I tested 2.13.12 with sbt 1.9.6 (where it uses the binary bridge) and 1.9.4 (where it uses the bridge compiled from zinc sources), it happens in both cases.
Transfered from scala/bug#12887 - I was first thinking this is a new issue in scala/scala, but it is in fact an old issue in zinc (possibly the compiler bridge).