-
Notifications
You must be signed in to change notification settings - Fork 5.8k
8303355: The Depend plugin does fully recompile when primitive type changes #12801
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
Conversation
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
Webrevs
|
@@ -878,24 +880,30 @@ public Void visitModifiers(ModifiersTree node, Void p) { | |||
return super.visitModifiers(node, p); | |||
} | |||
|
|||
@Override | |||
public Void visitPrimitiveType(PrimitiveTypeTree node, Void p) { | |||
update(node.getPrimitiveTypeKind().name()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't DependTest
include a test to stress this new code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test updated:
de84439
Thanks!
@lahodaj This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 43 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. ➡️ To integrate this PR with the above commit message to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, thanks
/integrate |
Going to push as commit dbb562d.
Your commit was automatically rebased without conflicts. |
The OpenJDK build is using a Plugin called Depend to avoid building Java code unnecessarily. It has two parts, one is checking module APIs (and forces rebuild of dependent modules if a dependency changes), and second takes modified files in a module, and attempts to detect whether it is enough to recompile these files, or if the whole module must be rebuilt.
There's a bug in the second part, it does not track changes in primitive types, so e.g. a change of a type of a public field form
int
tolong
does not cause recompile.This patch fixes that by visiting the primitive types, and including them in the hash computed for the given file.
There's also another problem - if a module is being recompiled from scratch due to a change in a file hash, the new/updated file hashes are written immediately. And if the compilation consequently fails, the state is not compared to the original hash, but to the hash from the broken compilation, which may lead to missing compilation of some files.
This patch moves the code to write the new hashes to the end of compilation, and only do that when there were no compile-time errors during the compilation.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/12801/head:pull/12801
$ git checkout pull/12801
Update a local copy of the PR:
$ git checkout pull/12801
$ git pull https://git.openjdk.org/jdk pull/12801/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 12801
View PR using the GUI difftool:
$ git pr show -t 12801
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/12801.diff