-
Notifications
You must be signed in to change notification settings - Fork 307
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
7903596: JMH: Explicitly enable annotation processors #125
base: master
Are you sure you want to change the base?
Conversation
…ntime - ERROR: Unable to find the resource: /META-INF/BenchmarkList
👋 Welcome back jpai! A progress list of the required criteria for merging this PR into |
Webrevs
|
There are tests in JMH that test archetypes work, please run them. The easiest way is do this is enabling JMH GHA: |
Hello Aleksey, thank you for that info. I've enabled the actions and the job is in progress. There are some Windows failures, but those don't appear related:
There's a macos run going on in that run for a while now, I'll check it out tomorrow on how it goes. |
I had a look at the Windows failures reported in GitHub actions job - they all appear to be:
I'm unfamiliar with those tests, but the error doesn't suggest it's due to the changes in this PR. Would you happen to know, Aleksey? |
@jaikiran This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
Please keep open, hoping for a review. |
@jaikiran This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration! |
@jaikiran This pull request has been inactive for more than 8 weeks and will now be automatically closed. If you would like to continue working on this pull request in the future, feel free to reopen it! This can be done using the |
/open |
@jaikiran This pull request is now open |
❗ This change is not yet ready to be integrated. |
Re-opening this PR since the issue is still applicable. Without the changes in this PR, generating a project using the archetype:
Then running the project:
results in:
With the changes in this PR, the newly generated projects from the archetype can successfully launch the benchmarks even against Java 23. |
I just got bit by this issue and lost a couple of hours. Having this archetype up-to-date would have helped. Instead, my developer experience looked like this:
First, I could have saved some time if this archetype had been up-to-date, since it would have given me the thread of the relevant difference in the POM to pull on. Second, that I'm only discovering this through a PR I had to track down semi-manually means that there are probably a lot of folks who are having this issue but don't find the cause. In my opinion, for whatever that's worth, I think merging this PR would be very helpful, since it would at least put this PR in the main branch to help people find it. I also think adding a "gotcha" to the README would help, too. |
Just bumped into this.
+1 |
Any reviewers who can review this one, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks okay, but shouldn't the fix also include adding -processor
all around the JMH modules, like jmh-samples
, jmh-core-it
and such? Should probably be enough to add it to jmh-parent
here:
Lines 175 to 179 in 7c6da95
<configuration> | |
<compilerVersion>1.8</compilerVersion> | |
<source>1.8</source> | |
<target>1.8</target> | |
</configuration> |
Please rebase from master and test full JMH build with JDK 23.
I'm having a look at this. I've rebased and have started compiling on JDK 23. It turns out there's a bit more to it than updating the root POM. Will update with progress here in a bit. EDIT: Here is what I've tried and what I've learned, since I'm not sure the best way to PR a PR in GitHub, and just in case I don't end up having the time to run this to ground. I'm running builds on ubuntu24.04. I can confirm that build runs happily on JDK 17 and 21. I can also confirm that the build does not run happily on JDK 23. Here is what I've learned regarding builds on JDK 23. I'm merely commenting on what works below. I'm very, very open to the idea -- indeed, I suspect -- that there are better ways. Edits to pom.xmlA build on master fails in jmh-core with many, many errors like The following patch addresses these issue:
Edits to jmh-core-it/pom.xmlThe build now fails in The following patch addresses this issue:
Edits to jmh-core-ct/pom.xmlThe build now fails in
The following patch DOES NOT address these issues:
This is where I am for now. I will update here if/as I make more progress. |
Can I please get a review of this change which proposes to address the issue noted in https://bugs.openjdk.org/browse/CODETOOLS-7903596?
As noted in that issue, when a benchmark generated using Java 22 is run, at runtime it fails with:
This is due to annotation processors being disabled by default during compilation starting Java 22. The commit in this PR, explicitly enables the
org.openjdk.jmh.generators.BenchmarkProcessor
annotation processor to allow for it to generate the necessary benchmark resources.I've tested this change locally, with Java 8, Java 21 as well as Java 22 and the newly generated benchmark is now functional on all these versions.
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jmh.git pull/125/head:pull/125
$ git checkout pull/125
Update a local copy of the PR:
$ git checkout pull/125
$ git pull https://git.openjdk.org/jmh.git pull/125/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 125
View PR using the GUI difftool:
$ git pr show -t 125
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jmh/pull/125.diff
Using Webrev
Link to Webrev Comment