-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
8290561: Coalesce incubator-module warnings for single-file source-code programs #9607
Conversation
👋 Welcome back jlahoda! A progress list of the required criteria for merging this PR into |
@lahodaj This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
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!
@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 568 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 |
/integrate |
Going to push as commit 26f2a97.
Your commit was automatically rebased without conflicts. |
Consider a trivial code like:
And an execution like:
Having two warnings (one from runtime, one from javac) seems unnecessary. The patch proposed herein tries to avoid the javac warning, keeping only the runtime one. The conditions under which an incubator module is ignored w.r.t. this warning are:
-XDsourceLauncher
(which can possibly be used in other cases).This is to avoid cases where we would incorrectly suppress the incubator warning, e.g. when
-XDsourceLauncher
would be passed on the command line.There are other ways to attempt to detect javac invocations from the source launcher - a distinct file manager is used by the source launcher (but detection of the specific file manager does not feel in line with general javac approach); or use of the
jdk.internal.javac.source
system property set by the native launcher (but this is only set when--source
option is used, as far as I know, and javac also typically does not check system properties).Note that there is JDK-8290563 to improve the text of the javac warning.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/9607/head:pull/9607
$ git checkout pull/9607
Update a local copy of the PR:
$ git checkout pull/9607
$ git pull https://git.openjdk.org/jdk pull/9607/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 9607
View PR using the GUI difftool:
$ git pr show -t 9607
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/9607.diff