-
Notifications
You must be signed in to change notification settings - Fork 3.9k
all: fix build with errorprone 2.18 #9886
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
Conversation
8697f9f
to
4fecdda
Compare
Unfortunately we can't upgrade errorprone as grpc-java still needs to support Java 8, which newer errorprone versions do not support. You can see the build failure complain about class file versions... |
Can I change the the PR to simply include the errorprone fixes rather than the upgrade? It's very helpful if grpc-java is included in a project using a recent errorprone version. (Maybe it would make sense to only run errorprone on Java 11?) |
Yeah, that'd be fine. We regularly run on Java 8 (not because it is good, but because it is supported), so I'd probably want it still to work on Java 11. I guess it wouldn't be that hard to choose which version to use based on the Java version that Gradle is running with. That'd obviously have benefits to you, but it isn't mandatory. |
bfa2695
to
b7471b4
Compare
errorprone cannot be updated past 2.10 because later versions do not support Java 8. Fixes grpc#9916.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like the Android build fails with a lint error:
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script to proceed with errors:
...
android {
lintOptions {
abortOnError false
}
}
...
Errors found:
/tmpfs/src/github/grpc-java/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java:943: Error: Call requires API level 24 (current min is 19): java.lang.Math#multiplyExact [NewApi]
Math.multiplyExact(responseSizes.size(), numRequests), recorder.getValues().size());
~~~~~~~~~~~~~
/tmpfs/src/github/grpc-java/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java:978: Error: Call requires API level 24 (current min is 19): java.lang.Math#multiplyExact [NewApi]
Math.multiplyExact(responseSizes.size(), numRequests), recorder.getValues().size());
~~~~~~~~~~~~~
/tmpfs/src/github/grpc-java/interop-testing/src/main/java/io/grpc/testing/integration/AbstractInteropTest.java:1131: Error: Call requires API level 24 (current min is 19): java.lang.Math#multiplyExact [NewApi]
Math.multiplyExact(responseSizes.size(), numRequests), recorder.getValues().size());
~~~~~~~~~~~~~
@benjaminp - thank you! |
errorprone cannot be updated past 2.10 because later versions do not support Java 8.
Fixes #9916.