Skip to content
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

all: fix build with errorprone 2.18 #9886

Merged
merged 1 commit into from Mar 1, 2023
Merged

all: fix build with errorprone 2.18 #9886

merged 1 commit into from Mar 1, 2023

Conversation

benjaminp
Copy link
Contributor

@benjaminp benjaminp commented Feb 10, 2023

errorprone cannot be updated past 2.10 because later versions do not support Java 8.

Fixes #9916.

@temawi temawi self-requested a review February 17, 2023 17:47
@temawi
Copy link
Contributor

temawi commented Feb 17, 2023

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...

@benjaminp
Copy link
Contributor Author

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?)

@ejona86
Copy link
Member

ejona86 commented Feb 23, 2023

Can I change the the PR to simply include the errorprone fixes rather than the upgrade?

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.

@benjaminp benjaminp changed the title Upgrade errorprone to 2.18 all: fix build with errorprone 2.18 Feb 28, 2023
@temawi temawi added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 1, 2023
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 1, 2023
errorprone cannot be updated past 2.10 because later versions do not support Java 8.

Fixes grpc#9916.
Copy link
Contributor

@temawi temawi left a 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());
               ~~~~~~~~~~~~~

@temawi temawi added the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 1, 2023
@grpc-kokoro grpc-kokoro removed the kokoro:run Add this label to a PR to tell Kokoro the code is safe and tests can be run label Mar 1, 2023
@temawi temawi merged commit ae6c506 into grpc:master Mar 1, 2023
@benjaminp benjaminp deleted the ep-218 branch March 1, 2023 21:46
@temawi
Copy link
Contributor

temawi commented Mar 1, 2023

@benjaminp - thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 31, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BanJNDI errorprone error in JndiResourceResolverFactory with rules_java v5.4.1
4 participants