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-8296968: Update langtools tests to use @enablePreview #11149

Closed
wants to merge 5 commits into from

Conversation

jddarcy
Copy link
Member

@jddarcy jddarcy commented Nov 14, 2022

Update langtools tests to use JTreg's @enablePreview tag, where appropriate.


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-8296968: Update langtools tests to use @enablePreview

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11149

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

Using diff file

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

@bridgekeeper
Copy link

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

openjdk bot commented Nov 14, 2022

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

  • compiler

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 compiler compiler-dev@openjdk.org label Nov 14, 2022
@mlbridge
Copy link

mlbridge bot commented Nov 14, 2022

Webrevs

Copy link
Member

@sundararajana sundararajana left a comment

Choose a reason for hiding this comment

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

LGTM

@openjdk
Copy link

openjdk bot commented Nov 15, 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:

8296968: Update langtools tests to use @enablePreview

Reviewed-by: sundar, jjg

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

  • 2159170: 8296453: Simplify resource_area uses in ClassPathDirEntry::open_stream
  • 95c390e: 8296956: [JVMCI] HotSpotResolvedJavaFieldImpl.getIndex returns wrong value
  • 68d3ed5: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters
  • 37848a9: 8296967: [JVMCI] rationalize relationship between getCodeSize and getCode in ResolvedJavaMethod
  • b3ef337: 8296960: [JVMCI] list HotSpotConstantPool.loadReferencedType to ConstantPool
  • f0474b8: 8283238: make/scripts/compare.sh should show the diff when classlist does not match
  • 04a4d34: 8297006: JFR: AbstractEventStream should not hold thread instance
  • 5db1b58: 8296961: [JVMCI] Access to j.l.r.Method/Constructor/Field for ResolvedJavaMethod/ResolvedJavaField
  • 4ce4f38: 8296958: [JVMCI] add API for retrieving ConstantValue attributes
  • 8c26d02: 8295315: [REDO] 8276687 Remove support for JDK 1.4.1 PerfData shared memory files
  • ... and 27 more: https://git.openjdk.org/jdk/compare/fafe68296721c9e4e0518dfb15d92e98ccc798b7...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 the ready Pull request is ready to be integrated label Nov 15, 2022
Copy link
Member

@JimLaskey JimLaskey left a comment

Choose a reason for hiding this comment

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

Just as a note: when using @enablePreview it is unnecessary to use @run main/othervm ... . That is the @run statement can be dropped.

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Choose a reason for hiding this comment

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

In various places /othervm has been left in place, but not clear why.

In one place, whitespace was fixed, but @enablePreview was not added

* @compile --enable-preview -source ${jdk.version} Patterns.java
* @run main/othervm --enable-preview Patterns
* @enablePreview
* @run main/othervm Patterns
Copy link
Contributor

Choose a reason for hiding this comment

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

do we still need /othervm ?

Copy link
Member Author

Choose a reason for hiding this comment

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

I suppose it isn't strictly required; I assume the @enablePreview functionality handles this if needed. I'll go through and remove the /othervm options and make sure the tests still pass, etc.

* @enablePreview
* @compile EnumTypeChanges.java
* @compile EnumTypeChanges2.java
* @run main/othervm EnumTypeChanges
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need /othervm ?

@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8268320
* @summary Verify user-friendly errors are reported for ill-formed pattern.
* @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
* @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
Copy link
Contributor

Choose a reason for hiding this comment

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

why no @enablePreview for this test?

Copy link
Member Author

Choose a reason for hiding this comment

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

The test has multiple @compile directives, one of which does not use --enable-preview. (I didn't check closely to see if enablePreview could be toggled on/off for different sets of directives.)

Copy link
Contributor

Choose a reason for hiding this comment

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

You can't toggle. Thanks for the note.

* @enablePreview
* @compile SealedTypeChanges.java
* @compile SealedTypeChanges2.java
* @run main/othervm SealedTypeChanges
Copy link
Contributor

Choose a reason for hiding this comment

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

/othervm ?

* @run main/othervm --enable-preview SimpleAndGuardPattern
* @enablePreview
* @compile -doe SimpleAndGuardPattern.java
* @run main/othervm SimpleAndGuardPattern
Copy link
Contributor

Choose a reason for hiding this comment

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

/othervm ?

- compiler.note.preview.filename: SwitchErrors.java, DEFAULT
- compiler.note.preview.recompile
55 errors
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting glyph for no trailing newline; I've not seen that before

@@ -1,3 +1,4 @@

Copy link
Contributor

Choose a reason for hiding this comment

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

Nit - maybe add the empty line behind or before the @test comment, just to be sure header checkers are not confused?

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay -- must have accidentally added a blank line.

Copy link
Contributor

@jonathan-gibbons jonathan-gibbons left a comment

Choose a reason for hiding this comment

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

Nice cleanup

@@ -2,7 +2,7 @@
* @test /nodynamiccopyright/
* @bug 8268320
* @summary Verify user-friendly errors are reported for ill-formed pattern.
* @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
* @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
Copy link
Contributor

Choose a reason for hiding this comment

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

You can't toggle. Thanks for the note.

@jddarcy
Copy link
Member Author

jddarcy commented Nov 17, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Nov 17, 2022

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

  • 2159170: 8296453: Simplify resource_area uses in ClassPathDirEntry::open_stream
  • 95c390e: 8296956: [JVMCI] HotSpotResolvedJavaFieldImpl.getIndex returns wrong value
  • 68d3ed5: 8296442: EncryptedPrivateKeyInfo can be created with an uninitialized AlgorithmParameters
  • 37848a9: 8296967: [JVMCI] rationalize relationship between getCodeSize and getCode in ResolvedJavaMethod
  • b3ef337: 8296960: [JVMCI] list HotSpotConstantPool.loadReferencedType to ConstantPool
  • f0474b8: 8283238: make/scripts/compare.sh should show the diff when classlist does not match
  • 04a4d34: 8297006: JFR: AbstractEventStream should not hold thread instance
  • 5db1b58: 8296961: [JVMCI] Access to j.l.r.Method/Constructor/Field for ResolvedJavaMethod/ResolvedJavaField
  • 4ce4f38: 8296958: [JVMCI] add API for retrieving ConstantValue attributes
  • 8c26d02: 8295315: [REDO] 8276687 Remove support for JDK 1.4.1 PerfData shared memory files
  • ... and 27 more: https://git.openjdk.org/jdk/compare/fafe68296721c9e4e0518dfb15d92e98ccc798b7...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 17, 2022

@jddarcy Pushed as commit e2269fd.

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

@jddarcy jddarcy deleted the JDK-8296968 branch June 10, 2023 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler compiler-dev@openjdk.org integrated Pull request has been integrated
5 participants