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-8292060: Make ClassFileVersionTest.java version adapting #9796

Closed
wants to merge 1 commit into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Aug 8, 2022

The goal of this update is to allow ClassFileVersionTest.java to be modified less often while still testing class files of the latest version.

Since the build policy of the JDK is to use the latest source and target, the class files in the java.base module will have the latest major version. By having the test file itself reference a preview API, its class file will have a nonzero minor version. (Simply compiling under "--enable-preview -source ${jdk.version}" is not sufficient to cause the minor version bits to be set.)

As written, the test now only need to be updated when the referenced API goes non-preview as opposed needing to be updated for every feature release.

After JDK-8289106 is fixed, setting latestMajor can be changed to something like

ClassFileFormatVersion.latest().major()


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

Issue

  • JDK-8292060: Make ClassFileVersionTest.java version adapting

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 9796

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Aug 8, 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 8, 2022
@openjdk
Copy link

openjdk bot commented Aug 8, 2022

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

  • hotspot-runtime

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

@openjdk openjdk bot added the hotspot-runtime hotspot-runtime-dev@openjdk.org label Aug 8, 2022
@mlbridge
Copy link

mlbridge bot commented Aug 8, 2022

Webrevs

Copy link
Member

@hseigel hseigel left a comment

Choose a reason for hiding this comment

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

Changes look good. Thanks!

@openjdk
Copy link

openjdk bot commented Aug 9, 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:

8292060: Make ClassFileVersionTest.java version adapting

Reviewed-by: hseigel

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

  • 4040927: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index
  • 8d0d9ea: 8291238: JDK can't be built without G1
  • aff7689: 8292075: Remove deleted test compiler/rangechecks/TestRangeCheckHoistingScaledIV.java from ProblemList
  • 3677b55: 6391806: JLabel and AbstractButton's imageUpdate method should be better specified
  • 0ade264: 8290814: Hide G1RootRegions behind G1ConcurrentMark
  • f5b3618: 8291970: Add TableStatistics get function to ResourceHashtable
  • cbc9040: 8290278: JavaDoc of index parameter of method JTabbedPane.insertTab
  • 2712bc3: 8289741: Remove unused imports from DTDBuilder.java
  • af243ca: 8265433: IGV: add graph tooltips with properties
  • 7739843: 8288633: The ICC_ColorSpace.fromCIEXYZ method uses the wrong rendering intent
  • ... and 15 more: https://git.openjdk.org/jdk/compare/ae52053757ca50c4b56989c9b0c6890e504e4088...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.

@jddarcy
Copy link
Member Author

jddarcy commented Aug 9, 2022

/integrate

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Aug 9, 2022
@jddarcy
Copy link
Member Author

jddarcy commented Aug 9, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Aug 9, 2022

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

  • 4040927: 8290047: (fs) FileSystem.getPathMatcher does not check for ":" at last index
  • 8d0d9ea: 8291238: JDK can't be built without G1
  • aff7689: 8292075: Remove deleted test compiler/rangechecks/TestRangeCheckHoistingScaledIV.java from ProblemList
  • 3677b55: 6391806: JLabel and AbstractButton's imageUpdate method should be better specified
  • 0ade264: 8290814: Hide G1RootRegions behind G1ConcurrentMark
  • f5b3618: 8291970: Add TableStatistics get function to ResourceHashtable
  • cbc9040: 8290278: JavaDoc of index parameter of method JTabbedPane.insertTab
  • 2712bc3: 8289741: Remove unused imports from DTDBuilder.java
  • af243ca: 8265433: IGV: add graph tooltips with properties
  • 7739843: 8288633: The ICC_ColorSpace.fromCIEXYZ method uses the wrong rendering intent
  • ... and 15 more: https://git.openjdk.org/jdk/compare/ae52053757ca50c4b56989c9b0c6890e504e4088...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Aug 9, 2022

@jddarcy Pushed as commit ae1a9a0.

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

@openjdk
Copy link

openjdk bot commented Aug 9, 2022

@jddarcy The command integrate can only be used in open pull requests.

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.

@jddarcy please note that hotspot changes, including tests, are subject to a two review rule.

I'm not sure this makes that much difference versus editing the jcod file. Can we define a fake preview class to use instead?

Comment on lines +42 to +43
* compilation. If a particular class becomes non-preview, any
* currently preview class can be substituted in.
Copy link
Member

Choose a reason for hiding this comment

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

This potentially will need changing on each release so doesn't really make the test more stable.

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