Closed msridhar closed 9 months ago
@yuxincs this fixes the issue that caused release 0.10.20 to be unusable on older Error Prone versions
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
abff73e
) 86.94% compared to head (77067b0
) 86.95%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Error Prone 2.24.0 introduces new overloads of
ASTHelpers.hasDirectionAnnotationWithSimpleName
; see https://github.com/google/error-prone/commit/aa6e3e7be223e5f8319609281b229d4db4219654. This causes backward compatibility issues when compiling against EP 2.24.0+ and then running on an older version of Error Prone. We introduce a wrapper method to avoid this issue. We also modify ourtestJdk8
tasks to properly test the scenario of compiling against the newest supported Error Prone version and then running on the oldest supported version, which would have caught this issue.Ideally we would have our own EP check preventing direct calls to
ASTHelpers.hasDirectionAnnotationWithSimpleName
, but that can be done in a follow-up.