-
Notifications
You must be signed in to change notification settings - Fork 123
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
Overcompilation with incremental, mixed Java/Scala file edits in 1.9.0-RC1 #1311
Comments
@SethTisue Would you mind to move this issue to Zinc repo? By the way, I am unfamiliar with how Github works, but would it be possible to grant me the privilege to close / move issues around? So I don't have to ping you over and over again for these chores. In the meantime, for any zinc contributors reading this, let's do some brainstorming. First off, what is Carston's infinite compile fix doing? Judging by the PR description "when we have transitive invalidations include recompiled classes in the next incremental compile round.", and the code snippet below, what it is doing seems to be keep continuing until everything is recompiled when transitive invalidation is triggered. zinc/internal/zinc-core/src/main/scala/sbt/internal/inc/IncrementalCommon.scala Lines 177 to 192 in 1c809a6
Assuming my understanding is correct, then I guess Carston's fix did not actually fix the root cause of the issue (but rather it is a last ditch effort safeguard mechanism), and there's still a need to identify the underlying root cause for infinite compilation. |
@Friendseeker I just sent you an invite to https://github.com/orgs/sbt/teams/sbt-triage-team. |
@LaCuneta Would you mind to provide instruction to reproduce the issue on https://github.com/NetLogo/NetLogo? I would like to do some integration testing. Was still playing around with the previous infinite compile fix, and apparently my initial understanding of "what it is doing seems to be keep continuing until everything is recompiled when transitive invalidation is triggered." is wrong. There was a stopping condition that I overlooked. |
@Friendseeker Thanks for working on this! Here are the steps to reproduce with NetLogo. NetLogo has some funky system dependencies for the full build, but I don't think they're necessary just to get compilation to happen:
Next edit
And for reference, here is the same change when running sbt 1.3.13:
Let me know if you have any trouble with it. |
Here's the result with & without the PR fix on my machine Without the fix
With the fix
|
Marvelous to see this getting fixed! Thank you @Friendseeker ! |
This is a follow up to this issue and the fix for the related zinc issue. I took jdsalchow's minimum repro repo, I set the sbt version to 1.3.13 (known working version from our affected project), and things worked as normal:
I edited
A.scala
andABase.java
(just whitespace changes, no real code edits) and saw:Which seems fine.
Then I updated the sbt version to
1.9.0-RC1
. I cleaned the repo and the first compile was the same as before:But after the non-code whitespace edits I saw:
It's now invalidating all Scala and Java files and recompiling the whole source tree. For this small repo that only takes a few seconds, but for our repo it takes 90 seconds or more. Since things were working as expected in 1.3.13 this seems like a regression.
Editing one Scala file and one Java file seems necessary to trigger the issue. If I modify just one type or the other it compiles just the changed files.
The text was updated successfully, but these errors were encountered: