melix / jmh-gradle-plugin

Integrates the JMH benchmarking framework with Gradle
Apache License 2.0
673 stars 87 forks source link

Compilation fails with jmh-generator-annprocess:1.37 #260

Open sergeykad opened 11 months ago

sergeykad commented 11 months ago

Describe the bug Running build with jmhAnnotationProcessor 'org.openjdk.jmh:jmh-generator-annprocess:1.37' causes compilation failure due to missing shouldYield field in the org.openjdk.jmh.runner.InfraControl class.

Downgrading back to version 1.36 resolves the issue.

                if (control.shouldYield) Thread.yield();
                           ^
  symbol:   variable shouldYield
  location: variable control of type InfraControl

To Reproduce Steps to reproduce the behavior:

  1. Upgrade to jmh-generator-annprocess:1.37
  2. Run build
  3. See the error mentioned above
sergeykad commented 11 months ago

Adding the dependencies listed below solved the issue, but according to the documentation it should have been optional.

    jmh 'org.openjdk.jmh:jmh-core:1.37'
    jmh 'org.openjdk.jmh:jmh-generator-annprocess:1.37'