-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
JMH fails after some changes in 28th of May #9618
Comments
I looked up the commits the snapshots were built from. This is the range: 8aa3142...ae078a5 |
@paplorinc Good news and bad news. Good news, I have some fixes pushed to melix/jmh-gradle-plugin#153 to fix the JMH plugin to handle the changes in 5.5 @melix could you take a look at melix/jmh-gradle-plugin#153 and merge? I'm happy to chat about it if you need more context. Bad news, I don't think this completely fixes the problem. Before Gradle 5.5, the classpath used by JMH had the entire Gradle runtime. I think that means it masked problems in the gradle/gradle build or the JMH plugin. When running with the changes in the PR above, JMH starts running the benchmarks and fails in a different way:
I think this may have only worked before because the Gradle runtime was leaking into the worker and into the JMH benchmark. Now that we're not doing that, we're missing dependencies from the benchmark. I think this is a problem in the JMH Gradle plugin still, but I don't fully grok the relationship between jmh, jmhImplementation and jmhRuntime. It seems like this should be part of the classpath for the benchmark tests, but I don't see how they're used by the JMHTask right now. WDYT @melix ? |
Thanks @big-guy!
Could very well be, I have to run them every time like: |
@big-guy, do you think other plugins or users will face the same? Are we safe to release 5.5 this way? |
@paplorinc I doubt other workers are doing what the JMH library does to derive a classpath. It was looking at the |
I have released |
Fixes: "Error: Could not find or load main class org.openjdk.jmh.runner.ForkedMain" https://stackoverflow.com/questions/51952083/error-could-not-find-or-load-main-class-org-openjdk-jmh-runner-forkedmain gradle/gradle#9618
It seems the nightly build from 2019 05 28 contained some changes that prohibit us from running JMH tests locally
It applies to the release branch as well
There are two snapshots for that day, the second one broke it:
• gradle-5.5-20190528232623+0000-bin.zip - bad
• gradle-5.5-20190528142438+0000-bin.zip - good
You can reproduce it on
master
currently if you run./gradlew jmh
from the root it will fail with:The text was updated successfully, but these errors were encountered: