-
Notifications
You must be signed in to change notification settings - Fork 744
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
Unable to pass parameter to ErrorProne in Maven with JDK 11 #1136
Comments
AFAICT, you need to use 2.3.2-SNAPSHOT with JDK 11, but even then, your build would still fail: you need to pass all Error Prone arguments in the same <arg>-Xplugin:ErrorProne
-Xep:MissingCasesInEnumSwitch:OFF
-Xep:ParameterName:OFF
-Xep:JdkObsolete:WARN
-Xep:BadAnnotationImplementation:ERROR
-Xep:BadComparable:ERROR
-Xep:BigDecimalEquals:ERROR
-Xep:BigIntegerEquals:ERROR
-Xep:CanonicalDuration:ERROR
-Xep:DateEquals:ERROR
-Xep:DivZero:ERROR
-Xep:EmptyIf:ERROR
-Xep:EqualsHashCode:ERROR
-Xep:FloatingPointLiteralPrecision:ERROR
-Xep:JavaLangClash:ERROR
-Xep:MultipleUnaryOperatorsInMethodCall:ERROR
-Xep:NumericEquality:ERROR
-Xep:ObjectToString:ERROR
-Xep:OptionalNotPresent:ERROR
-Xep:ShortCircuitBoolean:ERROR
-Xep:StaticGuardedByInstance:ERROR
-Xep:StaticQualifiedUsingExpression:ERROR
-Xep:StringEquality:ERROR
-Xep:SynchronizeOnNonFinalField:ERROR
-Xep:VarTypeName:ERROR
</arg> |
Hello @tbroyer, Thanks for your replay, it works. I didn't find any example of this in the documentation. And as I read this, @don-vip says that the version 2.3.1 should work with JDK 11. Anyway, now that I'm falling on the same error as #1083, we're waiting for release 2.3.2 👍 Best regards, |
#1115 😉 |
- We may want an ICU4J new enough to contain an Automatic-Module-Name. - Our old maven-surefire-plugin breaks with NullPointerException with JDK10+: https://bugzilla.redhat.com/show_bug.cgi?id=1572708 - Our old maven-compiler-plugin breaks with JDK11: google/error-prone#1136 (comment) (I don't have the error message handy anymore.) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272714574
- We may want an ICU4J new enough to contain an Automatic-Module-Name. - Our old maven-surefire-plugin breaks with NullPointerException with JDK10+: https://bugzilla.redhat.com/show_bug.cgi?id=1572708 - Our old maven-compiler-plugin breaks with JDK11: google/error-prone#1136 (comment) (I don't have the error message handy anymore.) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272714574
If run in the old style, it uses javac9, which can't handle the Java 11 class files in the JDK11 bootclasspath. This follows the instructions at https://errorprone.info/docs/installation#maven Note also the need to include -Xep:BetaApi:OFF in the same arg as -Xplugin:ErrorProne: google/error-prone#1136 (comment) google/error-prone#1115 (Also, incidentally update Error Prone itself. I forget whether I had a Java-11-related reason for that, but it seems like a good idea.) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272934125
If run in the old style, it uses javac9, which can't handle the Java 11 class files in the JDK11 bootclasspath. This follows the instructions at https://errorprone.info/docs/installation#maven Note also the need to include -Xep:BetaApi:OFF in the same arg as -Xplugin:ErrorProne: google/error-prone#1136 (comment) google/error-prone#1115 (Also, incidentally update Error Prone itself. I forget whether I had a Java-11-related reason for that, but it seems like a good idea.) RELNOTES=n/a ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=272934125
Hello,
We're usine errorprone with the OpenJDK 8 and all works well. Now we're planning to move to OpenJDK 11.
So, we adapted the configuration to the one below:
But it doesn't even try to compile and output the following error:
Note that if I remove all the
-Xep:
flags, the compilation occurs and fails with the following stacktrace:But that seems related to #1091 (or maybe passing the
--illegal-access=warn
flag). Or maybe related to the disabled checks above.Thanks in advance for your help !
The text was updated successfully, but these errors were encountered: