error-prone: Infinite compilation on JDK11
When upgrading to JDK 11.01, the compilation never finishes but has high CPU activity. When removing ErrorProne, the compilation completes without a problem. I am unsure how to debug, e.g. to see what the javac process is doing, to provide more details.
Environment:
- JDK 11.01 (upgrading from 10+46)
- Mac OS X Mojave
- Gradle 5.0
- ErrorProne:
- core: 2.3.2
- javac: 9+181-r4173-1
- plugin: 0.6
- Annotation Processors:
- autoFactory: 1.0-beta6
- autoValue: 1.6.3
- autoValueBuilder: 2.9.1
Of course if I disable the annotation processors then it fails due to the missing generated classes, but does terminate. Removing autoFactory leads to the hang, while autoValue is used too frequently to get a hang prior. So there is a chance that it is related to annotation processing (such as due to Gradle’s incremental support), but could be something else.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (4 by maintainers)
Java 12 worked! 😅
Okay, I’ll try JDK 12 since that’s faster than making a custom build of the plugin.
P.S. Thanks for the help so far @Stephan202 & @cushon
I’m still suspicious of JDK-8209055.
I think
-XDcompilePolicy=simpleis baked in to the gradle plugin: https://github.com/tbroyer/gradle-errorprone-plugin/blob/21ac96affce535420cf8266e8095a16047eb3e82/src/main/kotlin/net/ltgt/gradle/errorprone/ErrorPronePlugin.kt#L172Error Prone is supposed to throw an exception if that flag isn’t set: https://github.com/google/error-prone/blob/20bf092117ec70e14dfdd125d49f36c5a3f5bc0c/check_api/src/main/java/com/google/errorprone/BaseErrorProneJavaCompiler.java#L164
No luck with disabling all checks. I also tried updating to
2.3.3-SNAPSHOTwhich also hangs.Maybe this is JDK-8209055?
Are you using
-XDcompilePolicy=simple? If so, does removing that flag make a difference?