Skip to content

Bump Error Prone to 2.50.0, requires Java 21 - #517

Merged
slachiewicz merged 1 commit into
masterfrom
agent/errorprone-2.50
Sep 19, 2026
Merged

slachiewicz merged 1 commit into
masterfrom
agent/errorprone-2.50

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 15, 2026

Copy link
Copy Markdown
Member

Error Prone 2.37.0 reads JCCompilationUnit.endPositions, which JDK 27 removed in JDK-8372948, so javac-with-errorprone fails on JDK 27 with NoSuchFieldError. 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 raises javaVersion to 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 8 obsolescence warnings.

The remaining JDK 27 test failures in plexus-compiler-javac and plexus-compiler-eclipse are 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.

@slachiewicz slachiewicz added the dependencies Pull requests that update a dependency file label Sep 15, 2026
@slachiewicz
slachiewicz marked this pull request as ready for review September 15, 2026 23:20
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
slachiewicz merged commit e0cda5a into master Sep 19, 2026
36 checks passed
@slachiewicz
slachiewicz deleted the agent/errorprone-2.50 branch September 19, 2026 00:12
@slachiewicz slachiewicz added the breaking Pull requests that break existing features label Sep 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Pull requests that break existing features dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant