Skip to content

Conversation

@ejona86
Copy link
Member

@ejona86 ejona86 commented Nov 24, 2025

Error Prone 2.11 started requiring Java 11, so the previous version was already the last version that supported Java 8. Error Prone 2.32 requires Java 17, so stopped on 2.31 for now.

This fixes:

java.lang.NoSuchMethodError: 'com.google.errorprone.matchers.Description$Builder com.google.errorprone.matchers.Description.builder(com.sun.source.tree.Tree, java.lang.String, java.lang.String, com.google.errorprone.BugPattern$SeverityLevel, java.lang.String)'
    at io.grpc.annotations.checkers.ExperimentalApiChecker.describe(ExperimentalApiChecker.java:58)

Error Prone 2.18.0 marked Description.builder() as @RestrictedApi, and then Error Prone 2.19.0 changed its signature.

Fixes #29


@dsyer, fixing Java 11 without requiring Java 17 seems a good idea, as some people may still be using it for building (e.g., grpc-java itself, although it doesn't use this plugin). I also didn't mess with <release>, as it brings in the --add-exports goo. I also migrated away from Description.Builder, since it is marked restricted.

I may try to test this a bit more, but it seems pretty good. Specifically, the example needs changing, but I don't know if we'll do that after the release are before. Last release it seems we updated the example after the tag.

This is an alternative to #30

Error Prone 2.11 started requiring Java 11, so the previous version was
already the last version that supported Java 8. Error Prone 2.32
requires Java 17, so stopped on 2.31 for now.

This fixes:
```
java.lang.NoSuchMethodError: 'com.google.errorprone.matchers.Description$Builder com.google.errorprone.matchers.Description.builder(com.sun.source.tree.Tree, java.lang.String, java.lang.String, com.google.errorprone.BugPattern$SeverityLevel, java.lang.String)'
    at io.grpc.annotations.checkers.ExperimentalApiChecker.describe(ExperimentalApiChecker.java:58)
```

Error Prone 2.18.0 marked Description.builder() as `@RestrictedApi`, and
then Error Prone 2.19.0 changed its signature.

Fixes grpc#29
Copy link
Member

@jyane jyane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Eric for working on this.

Copy link
Member

@jyane jyane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ejona86 ejona86 merged commit c26483a into grpc:master Nov 26, 2025
2 checks passed
@ejona86 ejona86 deleted the errorprone-java11 branch November 26, 2025 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Latest version of error prone breaks this plugin

3 participants