-
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
8205129: Remove java.lang.Compiler #13092
Conversation
/csr |
👋 Welcome back eirbjo! A progress list of the required criteria for merging this PR into |
@eirbjo has indicated that a compatibility and specification (CSR) request is needed for this pull request. @eirbjo please create a CSR request for issue JDK-8205129 with the correct fix version. This pull request cannot be integrated until the CSR request is approved. |
/csr |
The actual change in this PR seems trivial (simply removes a file), so I guess it is more useful to review the CSR and the release note: https://bugs.openjdk.org/browse/JDK-8304458 (CSR) |
For reference, here's the discussion from 2016 when it was proposed to deprecate j.l.Compiler, for removal. Tim Ellison from IBM engaged in that discussion as one of the replies asked about applications running on the J9 VM using this API. The discussion is also a reminder that -Djava.compiler=NONE is the equivalent of -Xint, I thought that system property was dropped a long time ago. |
So it seems in 2016 IBM in was ok with an eventual removal of this class ("these APIs can be removed without grief") However, I see that later in the thread Azul Systems raised concerns about a removal: https://mail.openjdk.org/pipermail/core-libs-dev/2016-September/043585.html
Would be good if someone from Azul Systems could give a 2023 assessment on removing this class?
It exists in System.getProperties Javadocs at least:
Was this just for reference or are you suggesting that this PR is blocked by the 'java.compiler' somehow? |
https://bugs.openjdk.org/browse/JDK-8041676 suggests to deprecate it, but from the last comment we still seem to be waiting for @dholmes-ora to get back from vacation on the 22nd :-) |
A search of 3M classes in 130k artifacts found just 8 references to this class. 6 of the 8 are versions of the same thing which seems to be an off-label usage in a class named net.openhft.chronicle.core.Jvm where it calls Compiler.enable() instead of Thread.onSpinWait on older JDK releases. I remember the Azul mails from 2016 on this topic but I don't think they provided sufficient insight why an application would using this barely documented API. Anything relying on these methods to do something is probably very tied to the VM implementation. -Djava.compiler=NONE pre-dates "full speed debugging" and I would think all traces can be removed now. Yes, there is still a reference to this system property in System.getProperties that could be looked at too. All of these things are low priority. The good thing about removing java.lang.Compiler is that is avoids new developers from stumbling on it. |
I guess I never heard back from @stuart-marks . :( I think JDK-8041676 needs to be resolved along side this issue. |
I don't know how much interdependency there is between the The
which doesn't appear to be true, as Anyway it sounds to me like the next step is to deprecate the P.S. I note that I am finally getting back to @dholmes-ora on this issue, and it is in fact after he has returned from vacation on the 22nd. :-) |
That may be true today but originally they were very much inter-dependent:
The only part of that we have left today is that JDK 9 effectively severed the class from the property by removing the above wording, so in that sense the two issues can be addressed separately. We should have handled the property deprecation back in JDK 9 too (not that there is an actual definition/process of deprecating system properties). P.S I will try not to take any vacation until after this is resolved. :) |
Edit: ... unless |
The CSR for the removal of |
I think you should be able to finalize the CSR JDK-8304458. I think it would be good to remove "java.compiler" from the list of standard properties (table in System.getProperties) in the same release. |
Thanks for the gentle nudge, Alan. I was actually not aware that finalization could be initiated by the assignee! I've seen the CSR lead handle this workflow previously. I pressed the "Finalize" button.
Yes, these seem closely related. |
The CSR for this PR has now been approved. @jddarcy comments in the CSR:
My guess is the "comment" here refers to @AlanBateman comment above that it would be good to handle the removal of -Djava.compiler in the same release:
I have linked to JDK-8041676, even though that issue strictly describes the deprecation of -Djava.compiler, not the removal. I think what I'm trying to express here is that it's ok to refer to JDK-8041676 for the task that deals with the |
The CSR for this PR has been approved for a while now. The PR is still looking for reviewers. I know the change itself is not a very exciting one to review, it is after all just a file being deleted. But we still need a reviewer to approve it :-) Or maybe all reviewers are gone on easter vacation? |
@eirbjo 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 316 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@AlanBateman, @jaikiran) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
Good riddance. /integrate |
This PR is daydreaming about a sponsor walking by. |
Hello Eirik, I'll run this against our CI just to be sure and if things go fine, will sponsor this. |
/sponsor |
Going to push as commit a8e3a2d.
Your commit was automatically rebased without conflicts. |
The Release Note for this PR did not receive any comments. It would be good if a Reviewer can take a look at the release note and see if it is conforming to the desired style: https://bugs.openjdk.org/browse/JDK-8304459 Thanks! |
Please help review this PR which suggests we remove the class
java.lang.Compiler
. The class seems non-functional for a decade, and was terminally deprecated in Java 9. Time has come to let it go.Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13092/head:pull/13092
$ git checkout pull/13092
Update a local copy of the PR:
$ git checkout pull/13092
$ git pull https://git.openjdk.org/jdk.git pull/13092/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 13092
View PR using the GUI difftool:
$ git pr show -t 13092
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13092.diff
Webrev
Link to Webrev Comment