Bump Error Prone to 2.50.0, requires Java 21 - #517
Open
slachiewicz wants to merge 1 commit into
Open
slachiewicz wants to merge 1 commit into
slachiewicz wants to merge 1 commit into
Conversation
Error Prone 2.37.0 reads JCCompilationUnit.endPositions, which JDK 27 removed (JDK-8372948), so javac-with-errorprone fails on JDK 27. Error Prone fixed that in 2.47.0, and every release since 2.43.0 needs a JDK 21 runtime, so the errorprone module and the ITs move their javaVersion to 21. Since 2.46.0 Error Prone on JDK 21 also refuses to run without -XDaddTypeAnnotationsToSymbol=true, so the two ITs pass it.
slachiewicz
force-pushed
the
agent/errorprone-2.50
branch
from
September 15, 2026 23:38
83c7cd9 to
7fc81d5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Error Prone 2.37.0 reads
JCCompilationUnit.endPositions, which JDK 27 removed in JDK-8372948, sojavac-with-errorpronefails on JDK 27 withNoSuchFieldError. Error Prone fixed that in 2.47.0 (google/error-prone#5473, #5482), and every release since 2.43.0 needs a JDK 21 runtime, so this raisesjavaVersionto 21 for the errorprone module and the ITs and updates the module's site page. Since 2.46.0, Error Prone on JDK 21 refuses to start without-XDaddTypeAnnotationsToSymbol=true, so the two Error Prone ITs pass that flag. The unit test now derives its javac warning count from the runtime feature version instead of listing JDKs, because javac 21 and later all add the three-source 8obsolescence warnings.The remaining JDK 27 test failures in
plexus-compiler-javacandplexus-compiler-eclipseare unrelated to Error Prone; #518 fixes them on top of this PR.Verified: on JDK 27,
mvn verify -pl plexus-compilers/plexus-compiler-javac-errorprone,plexus-compiler-its -am -Dversion.maven-invoker-plugin=3.10.2-SNAPSHOT→ errorprone module tests green, 12 of 12 ITs pass, bytecode enforcer passes. The invoker snapshot is needed only because 3.10.1 ships a Groovy that cannot read Java 27 class files; CI on JDK 21 and 25 is unaffected.This change was created with AI assistance.