-
Notifications
You must be signed in to change notification settings - Fork 87
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
ErrorProne compatibility issue #248
Comments
The workaround is tasks.jmhCompileGeneratedClasses {
// See https://github.com/melix/jmh-gradle-plugin/issues/248
options.annotationProcessorPath = configurations.jmhAnnotationProcessor.get()
options.errorprone {
// JMH generates duplicate field names like byte p000, p001, p002
disable("HidingField")
}
} See jmh-gradle-plugin/src/main/groovy/me/champeau/jmh/JMHPlugin.groovy Lines 151 to 168 in d7974cf
|
Thanks, @vlsi . Actually adding the I also had to add In any case, I think at least part of these changes should be merged into the plugin. |
I am not convinced they should. Gradle properly isolates annotation processor dependencies from compile dependencies. The fact that you have to add the annotation processor classes to the compile classpath either means that error prone mixes its annotations with its processor, or that there is a bug in the error prone plugin. In both cases the fix should be on error prone. |
@melix , I believe error-prone-gradle-plugin properly adds dependencies to Does it make sense? |
So a better workaround is tasks.jmhCompileGeneratedClasses {
options.annotationProcessorPath = configurations.jmhAnnotationProcessor.get()
}
plugins.withId("net.ltgt.errorprone") {
tasks.jmhCompileGeneratedClasses {
options.errorprone {
// JMH generates duplicate field names like byte p000, p001, p002
disable("HidingField")
}
}
} |
Describe the bug
jmhCompileGeneratedClasses task fails with
error: plug-in not found: ErrorProne
message. There is a similar issue described here: tbroyer/gradle-errorprone-plugin#19To Reproduce
Steps to reproduce the behavior:
jmhCompileGeneratedClasses
taskThe text was updated successfully, but these errors were encountered: