Skip to content

ARTEMIS-5896 Bump ErrorProne to 2.48.0 & limit to JDK25+#6228

Open
jbertram wants to merge 1 commit intoapache:mainfrom
jbertram:ARTEMIS-5896
Open

ARTEMIS-5896 Bump ErrorProne to 2.48.0 & limit to JDK25+#6228
jbertram wants to merge 1 commit intoapache:mainfrom
jbertram:ARTEMIS-5896

Conversation

@jbertram
Copy link
Contributor

@jbertram jbertram commented Feb 10, 2026

Aside from the upgrade, this restricts ErrorProne to Java 25 and beyond. Technically speaking, it could run on 21, but that also requires a JDK parameter that is exclusively for 21. Restricting to 25 is the simplest solution without any meaningful down-sides.

@jbertram jbertram force-pushed the ARTEMIS-5896 branch 2 times, most recently from e86ca77 to 6d61bfb Compare February 10, 2026 16:51
@jbertram jbertram changed the title ARTEMIS-5896 Bump com.google.errorprone:error_prone_core from 2.42.0 … ARTEMIS-5896 Bump com.google.errorprone:error_prone_core from 2.42.0 to 2.47.0 Feb 10, 2026
@gemmellr
Copy link
Member

I didnt really like the idea of this since folks may have existing setups that use 17 / 21 with it enabled currently and will then silently no longer get these checks even though they may still think they are (the build time difference, and lack of log spam, would be hints...but still not everyone will spot it changing).

Of course, I didnt particularly like any of the alternatives either (such as making it fail in those cases, or even using different versions for different JDKs, and they hadnt even done the 'requires additional flag for JDK21' change last time I looked either) which is why I hadnt done anything about it since #5824. Hmm..

@jbertram
Copy link
Contributor Author

We could add a blurb in versions.adoc so folks know it's only enabled on 25 now. There's no great options here, just less bad.

@gemmellr
Copy link
Member

Renaming the Jira, e.g 'Update to ErrorProne 2.47.0 and restrict to JDK25+' (or reversed order) would also help convey it via release notes.

The CI config should also be updated to stop trying to enable it on 17/21 if knowing it can never work:

mvn -s .github/maven-settings.xml -DskipTests -Derrorprone -Pdev -Pjmh -Popenwire-tests -DskipActiveMQ5Tests -Pcompatibility-tests -DskipCompatibilityTests -Dshade-plugin-create-sources=true install

This change will also mean that the JDK 17/21 Checks runs always finish way before the JDK25 Checks run and will not have grabbed ErrorProne, so their cache updates will always win and not contain ErrorProne (they typically already win, by far less, but it doenst matter currently) , meaning the JDK25 builds will then download ErrorProne on every run. Could try to see if there is anything that can be added to the priming at

- name: Additional Cache Priming
run: |
cd artemis
mvn -s .github/maven-settings.xml clean verify -Prelease -Denforcer.skip -pl "artemis-unit-test-support,org.apache.activemq:artemis-junit-5"
to equalise things. Dont really want to have JDK-specific caches as it would eat into the cache quota and cause frequent churn. Could also just restrict it so only the JDK25 Checks job stores the cache, though I have previously preferred the 'competition' so any sporadic env issue on one JDK job doesnt stop the cache update.

@jbertram jbertram changed the title ARTEMIS-5896 Bump com.google.errorprone:error_prone_core from 2.42.0 to 2.47.0 ARTEMIS-5896 Bump ErrorProne to 2.48.0 & limit to JDK25+ Mar 2, 2026
@jbertram jbertram force-pushed the ARTEMIS-5896 branch 3 times, most recently from 81e22ad to 952a81e Compare March 4, 2026 21:07
@jbertram
Copy link
Contributor Author

jbertram commented Mar 5, 2026

I think this is as far as I can take this. I have no idea about the CI cache thing.

* Highlight 1
* Highlight 2

=== Upgrading from 2.51.0
Copy link
Member

Choose a reason for hiding this comment

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

2.52.0 now


=== Upgrading from 2.51.0

* For developers, due to https://issues.apache.org/jira/browse/ARTEMIS-5896[ARTEMIS-5896] ErrorProne will only run when building with Java 25.
Copy link
Member

Choose a reason for hiding this comment

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

Java 25+

@gemmellr
Copy link
Member

gemmellr commented Mar 6, 2026

I'll take a look at the cache thing next week. Since its just 1 plugin dep I think we can just merge regardless after the couple tiny fixes above.

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.

2 participants