Skip to content
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

8041676: remove the java.compiler system property #13475

Closed
wants to merge 2 commits into from

Conversation

jaikiran
Copy link
Member

@jaikiran jaikiran commented Apr 14, 2023

Can I please get a review of this change which removes the java.compiler system property? This addresses https://bugs.openjdk.org/browse/JDK-8041676.

A CSR has been filed for this change and is available at https://bugs.openjdk.org/browse/JDK-8305998. The CSR has more details about this proposed change, but to summarize, the java.compiler system property wasn't used in any practical way. With the recent removal of java.lang.Compiler interface from the JDK, the presence of this system property wasn't of any practical importance.

The commit in this PR, removes its reference from the System.getProperties() documentation and also removes the specific implementation from hotspot where it treated the values NONE and empty string in the absence of -Xdebug in a specific manner and considered it to be an instruction to run the application in interpreter-only mode. -Xint option has been around for this purpose, so removal of this java.compiler system property support from hotspot implementation wouldn't remove any usable feature for the applications.

Additionally, the hotspot implementation now logs a warning message when it detects the presence of java.compiler system property when java is launched. This warning message will be removed after a few releases.

The current JDK source has reference to the java.compiler system property in numerous NetBeans project build files. The usage of this system property in such files isn't necessary. However, this PR doesn't intend to cleanup those references, since it isn't clear which of those NetBeans projects are still relevant. I think we can use a separate PR to do that cleanup.

tier1, tier2, tier3 testing has been done with these changes and those tests have passed.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change requires CSR request JDK-8305998 to be approved

Issues

  • JDK-8041676: remove the java.compiler system property
  • JDK-8305998: remove the java.compiler system property (CSR)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/13475/head:pull/13475
$ git checkout pull/13475

Update a local copy of the PR:
$ git checkout pull/13475
$ git pull https://git.openjdk.org/jdk.git pull/13475/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 13475

View PR using the GUI difftool:
$ git pr show -t 13475

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/13475.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 14, 2023

👋 Welcome back jpai! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added csr Pull request needs approved CSR before integration rfr Pull request is ready for review labels Apr 14, 2023
@openjdk
Copy link

openjdk bot commented Apr 14, 2023

@jaikiran The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot-runtime

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot-runtime hotspot-runtime-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Apr 14, 2023
@mlbridge
Copy link

mlbridge bot commented Apr 14, 2023

Webrevs

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good. Thanks for cleaning this up.

warning("The java.compiler system property is obsolete and no longer supported,"
" use -Xint if you want to run the application in interpreted-only mode.");
} else {
warning("The java.compiler system property is obsolete and no longer supported.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks okay although the warning for the empty value and "NONE" case will probably wrap as it's very long. Today, -Djava.compiler=foo is ignored, no warning, seems good to emit a warning about that too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello Alan,

This looks okay although the warning for the empty value and "NONE" case will probably wrap as it's very long.

Agreed, it's a bit long. I can't think of a simpler message though. If anyone has a suggestion, I'll update accordingly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just drop the detailed explanation, they can check the help for -Xint.

"The java.compiler system property is obsolete and no longer supported, use -Xint".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Roger, updated the PR with this suggested change.

@openjdk
Copy link

openjdk bot commented Apr 19, 2023

@jaikiran 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:

8041676: remove the java.compiler system property

Reviewed-by: dholmes, alanb, rriggs, iris

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 68 new commits pushed to the master branch:

  • 4ad3ac6: 8306135: Clean up and open source some AWT tests
  • 85de01e: 8306323: Update license files in CLDR v43
  • 48fd4f2: 8303431: [JVMCI] libgraal annotation API
  • c57af31: 8306038: SystemModulesPlugin generates code that doesn't pop when return value not used
  • a31a11f: 8306006: strace001.java fails due to unknown methods on stack
  • ddb8646: 8306123: Move InstanceKlass writeable flags
  • 1a41e12: 8306310: Move is_shared Klass flag
  • c738c8e: 8306278: jvmtiAgentList.cpp:253 assert(offset >= 0) failed: invariant occurs on AIX after JDK-8257967
  • 9fb53ad: 8305716: Enhancements for printing age tables
  • ebba42a: 8305993: Add handleSocketErrorWithMessage to extend nio Net.c exception message
  • ... and 58 more: https://git.openjdk.org/jdk/compare/12358e6c94bc96e618efc3ec5299a2cfe1b4669d...master

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 master branch, type /integrate in a new comment.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Apr 19, 2023
@jaikiran
Copy link
Member Author

Thank you everyone for the reviews. The CSR has been approved, I'll go ahead and integrate this.

@jaikiran
Copy link
Member Author

/integrate

@openjdk
Copy link

openjdk bot commented Apr 20, 2023

Going to push as commit b8f0a66.
Since your change was applied there have been 73 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Apr 20, 2023
@openjdk openjdk bot closed this Apr 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Apr 20, 2023
@openjdk
Copy link

openjdk bot commented Apr 20, 2023

@jaikiran Pushed as commit b8f0a66.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants