-
Notifications
You must be signed in to change notification settings - Fork 125
Description
steps
Please see the reproducer
- https://github.com/ov7a/zinc-example/blob/main/src/main/scala/Main.scala
and its execution: - https://github.com/ov7a/zinc-example/actions/runs/11699629356/job/32581996234
In short, it does the following:
- creates a mixed java/scala project
- compiles java sources with javac and scala sources with zinc
- changes the java source and recompiles it
- recompiles the scala source with zinc
If all these steps are executed in a single sbt run, zinc does not see the updated java class properly. If 1-2 and 3-4 are made in two consecutive runs, it works as expected.
I can observe this behavior with zinc 1.10.4, 1.10.0, 1.9.6.
problem
I suspect it has something to do with the internal caches of zinc. However, I haven't found a proper way to clear them.
expectation
I expect the behavior to be the same: the state should be preserved in compileAnalysis, and all the necessary data should be there. Apparently, that's not the case.
I expect the same output to be produced if the same inputs are used, independent of the environment.
notes
Somebody may suspect that it depends on the loaded jars, but I get the same issue with the hardcoded, explicit paths to pre-downloaded jars.
The reproducer is a very rough approximation of how Gradle (8.10) works.
I stumbled across this issue while investigating
The only relevant change in 1.10.1 is fixed stamps for empty files/directories, but I can't reproduce Gradle's issue in isolation. If anyone has ideas about what can be an (implicit) input, it would be appreciated.