-
Notifications
You must be signed in to change notification settings - Fork 121
Unused imports cause non-deterministic incremental compiles #543
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
Comments
I want to fix all non-deterministic behaviours in Zinc, and whenever I sit to do so this ticket will prove useful. The reason for this change, assuming you're using 2.12, is most likely the unfinished classpath caching implementation in the compiler (not Zinc's fault): you can use |
This doesn't have to do with 2.12. This has to do with the fact that Zinc doesn't record information about imports if they are unused. And because the information is not recorded, the compile is no re-run if anything about the imported symbol is change, e.g. the dep is removed. (A a good workaround of course is to not have unused imports.) |
This issue is a duplication of #226, which describes the same underlying limitation. When I initially registered it, I marked it as |
Hm...yes. I originally didn't think so, but after a second look, the only way I can reproduce this bug is to use a wildcard import. |
Suppose
example.A
.example.A
.Step 1: Compile (fails)
Step 2: Add library dependency example.jar.
Step 3: Compile (succeeds).
Step 4: Remove library dependency example.jar.
Step 5: Compile (succeeds).
Steps 1 and 5 have the same source code, but 1 fails, and 5 succeeds.
The text was updated successfully, but these errors were encountered: