Skip to content

Conversation

@jaikiran
Copy link
Member

@jaikiran jaikiran commented Dec 12, 2025

Can I please get a review of this change which fixes the issue noted in https://bugs.openjdk.org/browse/CODETOOLS-7904122?

The commit here adds -cv 52.0 as an option when launching the jasm tool for compiling jasm files through jtreg's @compile action. This class file version will be used as the default version if the jasm file doesn't explicitly specify a class file version in it. The use of "-cv" option prevents the warning from being issued.

An existing self test has been updated to verify this change.


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

  • CODETOOLS-7904122: Compilation of jasm files leads to class file version warning (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 303

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jtreg/pull/303.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 12, 2025

👋 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
Copy link

openjdk bot commented Dec 12, 2025

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

7904122: Compilation of jasm files leads to class file version warning

Reviewed-by: cstein

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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 rfr Pull request is ready for review label Dec 12, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 12, 2025

Webrevs

$(GREP) '\---jasm-stderr:' $(@:%.ok=%)/work/JasmUsageTest.jtr > /dev/null
$(GREP) '\---jasm:' $(@:%.ok=%)/work/JasmUsageTest.jtr > /dev/null
# verify that the warning wasn't printed
$(GREP) 'Warning: Class file version not specified in file or by -cv parameter' \
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to (also) look for any other "Warning: ..." messages? 🤔

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 Christian, I wouldn't expect any other warning message and if there is one, I think we shouldn't allow that warning to fail this test. This test is merely interested in verifying that the class file version check warning message is not logged.

Copy link
Member

Choose a reason for hiding this comment

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

Okay.

Yet, with such a broader assertion, we would have caught the issue with compiling .jasm files earlier.

Copy link
Member Author

Choose a reason for hiding this comment

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

We would have to narrow down the "grep" to specific lines in that jtr file to be sure that only warning(s) from the @compile <file>.jasm action are considered in that check. That will require some grep skills. I can experiment with it, if you prefer we check for other warnings too.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants