-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zinc invalidates all java sources in mixed projects with any scala source change #867
Comments
That's currently a known/intentional behavior for pipelining. Is pipelining turned on? |
I don't know how to turn pipelining on so I assume it has always been off in the projects I test. At any rate, #868 fixes the issue I described above. |
Out of curiosity, when will compilation run with pickle java on? The behavior of always invalidating and recompiling all java sources has the potential to completely break incremental compilation in some projects which would offset much or even all of the performance gains of pipelining. |
Pipelining was on by default for a short while until I turned it off in #843.
Java pickling would be on when It's not a perfect situation. Java compilation tends to be relatively fast, and hopefully name hashing (includes API change comparison) would catch the invalidation from spreading. Further optimization is left to Lightbend as an exercise. |
Got it. My experience seems to be that name hashing does not prevent the invalidation from spreading though. In the example I described above in the sbt project, it did two cycles even though only |
steps
1.4.0-SNAPSHOT
sbt -Dsbt.version=1.4.0-SNAPSHOT
in the sbt repomain/src/main/scala/Foo.scala
compile
in the shellval x = 1
toval x = 2
inFoo.scala
compile
againproblem
zinc invalidates all 14 java sources
This not-only recompiles all the java classes but also triggers a second cycle which compiles more scala files:
expectation
Java sources are only invalidated when their source or binary dependencies change.
notes
The text was updated successfully, but these errors were encountered: