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

JDK-8173605: Remove support for source and target 1.7 option in javac #10074

Closed
wants to merge 27 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Aug 30, 2022

Update to remove support for -source/-target/--release 7 from javac.

As seen in the PR, many test fails are affected. Further refactorings of javac's implementation that can be made from dropping 7 support are left as future work.


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 a CSR request to be approved

Issues

  • JDK-8173605: Remove support for source and target 1.7 option in javac
  • JDK-8293047: Remove support for source and target 1.7 option in javac (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 10074

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 30, 2022

👋 Welcome back darcy! 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 the rfr Pull request is ready for review label Aug 30, 2022
@openjdk
Copy link

openjdk bot commented Aug 30, 2022

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

  • compiler
  • core-libs
  • hotspot-runtime
  • javadoc
  • kulla

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 javadoc javadoc-dev@openjdk.org csr Pull request needs approved CSR before integration hotspot-runtime hotspot-runtime-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Aug 30, 2022
@openjdk openjdk bot added compiler compiler-dev@openjdk.org kulla kulla-dev@openjdk.org labels Aug 30, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 30, 2022

Webrevs

@jddarcy
Copy link
Member Author

jddarcy commented Aug 30, 2022

Please also review the accompanying CSR:

https://bugs.openjdk.org/browse/JDK-8293047

Note that the DEFAULT_METHODS enum constant is used indirectly by a test to force a class file's minor version bits to be set as if a preview feature were used. If some other idiom is available, the DEFAULT_METHOD constant could be removed.

Tier 1 and tier 2 test results were clean with this changes.

@jddarcy
Copy link
Member Author

jddarcy commented Aug 30, 2022

Please also review the accompanying CSR:

https://bugs.openjdk.org/browse/JDK-8293047

Note that the DEFAULT_METHODS enum constant is used indirectly by a test to force a class file's minor version bits to be set as if a preview feature were used. If some other idiom is available, the DEFAULT_METHOD constant could be removed.

Tier 1 and tier 2 test results were clean with this changes.

PS I'll run a copyright update script before any push.

@@ -25,8 +25,7 @@
* @test
* @bug 8009267
* @summary Verify uses of isAnnotationPresent compile under older source versions
* @compile -source 1.7 -target 1.7 OldenCompilingWithDefaults.java
* @compile OldenCompilingWithDefaults.java
* @compile OldenCompilingWithDefaults.java
Copy link
Contributor

Choose a reason for hiding this comment

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

I skimmed through the description of JDK-8009267 and I'm wondering if this test is of any value now.

Copy link
Member Author

Choose a reason for hiding this comment

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

Certainly less useful than it once was!

I can remove it in the next push.

@vicente-romero-oracle
Copy link
Contributor

the PR looks good to me. You have mentioned that further refactorings could be done later on, I agree but you are already removing a lot of code, although that could have been forced to make some tests pass. I would recommend removing some support for 7 at com.sun.tools.javac.comp.Infer particularly the one guarded by allowGraphInference. I can also help with that later on if you prefer. If so please assign a follow-up for this issue to myself

Copy link
Contributor

@vicente-romero-oracle vicente-romero-oracle left a comment

Choose a reason for hiding this comment

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

looks good to me

@jddarcy
Copy link
Member Author

jddarcy commented Aug 31, 2022

the PR looks good to me. You have mentioned that further refactorings could be done later on, I agree but you are already removing a lot of code, although that could have been forced to make some tests pass. I would recommend removing some support for 7 at com.sun.tools.javac.comp.Infer particularly the one guarded by allowGraphInference. I can also help with that later on if you prefer. If so please assign a follow-up for this issue to myself

Thanks Vicente; I assigned

JDK-8293051: Further refactor javac after removal of -source/-target/--release 7

to you.

@openjdk openjdk bot removed the csr Pull request needs approved CSR before integration label Sep 1, 2022
@openjdk
Copy link

openjdk bot commented Sep 1, 2022

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

8173605: Remove support for source and target 1.7 option in javac

Reviewed-by: vromero

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

  • 17283cf: 8293011: riscv: Duplicated stubs to interpreter for static calls
  • 6076128: 8292008: Transition the JDK to the common standard of C11
  • 6f29734: 8293178: Remove obsolete properties from javadoc resource file
  • dd54153: 8293162: Drop support for VS2017
  • 12317ef: 8293046: Move CDS command-line flags to cds_globals.hpp

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
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 the ready Pull request is ready to be integrated label Sep 1, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Sep 1, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Sep 1, 2022

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

  • 7c2f299: 8293202: Document how to edit doc/testing, doc/building
  • 07616de: 8175382: clhsdb pmap should print the end addresses of the load modules
  • 9444a08: 8290709: Incorrect dominance error for unconditional pattern vs. null
  • 6a1b0b5: 8293154: TemporalQueries java doc error
  • 5204528: 8293201: Library detection in runtime/ErrorHandling/TestDwarf.java fails on some systems
  • 2d10d4f: 8291651: CleanerTest.java fails with "Cleanable was cleaned"
  • bd674dc: 8293163: G1: Rename G1HeapRegionAttr::is_humongous
  • 479795b: 8293164: Remove unimplemented Generation::print_heap_change
  • 6e6202c: 8292407: Improve Weak CAS VarHandle/Unsafe tests resilience under spurious failures
  • 17283cf: 8293011: riscv: Duplicated stubs to interpreter for static calls
  • ... and 4 more: https://git.openjdk.org/jdk/compare/372fc58e897d25713db0dfe289ed25c40d9a3985...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 1, 2022

@jddarcy Pushed as commit 2d18dda.

💡 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
compiler compiler-dev@openjdk.org core-libs core-libs-dev@openjdk.org hotspot-runtime hotspot-runtime-dev@openjdk.org integrated Pull request has been integrated javadoc javadoc-dev@openjdk.org kulla kulla-dev@openjdk.org
Development

Successfully merging this pull request may close these issues.

3 participants