Skip to content

ICU-23368 Update JDK version for tools to 21#3942

Open
mihnita wants to merge 3 commits intounicode-org:mainfrom
mihnita:mihai_jdk21
Open

ICU-23368 Update JDK version for tools to 21#3942
mihnita wants to merge 3 commits intounicode-org:mainfrom
mihnita:mihai_jdk21

Conversation

@mihnita
Copy link
Copy Markdown
Contributor

@mihnita mihnita commented Apr 14, 2026

ALLOW_MANY_COMMITS=true

Checklist

  • Required: Issue filed: ICU-23368
  • Required: The PR title must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Required: Each commit message must be prefixed with a JIRA Issue number. Example: "ICU-NNNNN Fix xyz"
  • Issue accepted (done by Technical Committee after discussion)
  • Tests included, if applicable
  • API docs and/or User Guide docs changed or added, if applicable
  • Approver: Feel free to merge on my behalf

mihnita added 3 commits April 14, 2026 11:40
We want to be able to control the JDK version separately.
Because errorprone will depend on the upstream errorprone, which requires
JDK 21, while the API reporting in `build` is best to run with the same jdk
version that the ICU released artifacts use.
<id>requires_jdk21</id>
<activation>
<!-- Using ${enforcer.requireJavaToolsVersion} does not work. Bug? -->
<jdk>[21,)</jdk>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Auto-activate profile if jdk version > 21

<jdk>[21,)</jdk>
</activation>
<modules>
<module>errorprone_report</module>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Only try building this module for jdk 21 or higher.
That's because errorprone itself requires jdk 21.

<!-- Dependencies versions -->
<commons-cli.version>1.11.0</commons-cli.version>
<error_prone.version>2.25.0</error_prone.version>
<error_prone.version>2.49.0</error_prone.version>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updating to the latest errorprone.
Which requires jdk 21.
what we had worked with jdk 11, but was more that one year old.

<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
<arg>--should-stop=ifError=FLOW</arg>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

These new flags are required by the new errorprone versions

See https://github.com/google/error-prone/issues/4256
-->
<arg>-Xplugin:ErrorProne -Xep:UnicodeEscape:OFF -Xep:InvalidBlockTag:OFF</arg>
<arg>-Xplugin:ErrorProne -Xep:UnicodeEscape:OFF -Xep:InvalidBlockTag:OFF -Xep:LabelledBreakTarget:WARN</arg>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

New failure detected by the new errorprone

<!-- Use <compilerArg> to pass flags to errorprone. See https://errorprone.info/docs/flags -->
<compilerArgs>
<arg>-XDcompilePolicy=simple</arg>
<arg>-XDaddTypeAnnotationsToSymbol=true</arg>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

same 2 flags as above

@mihnita mihnita requested a review from echeran April 14, 2026 20:47
@mihnita mihnita requested a review from markusicu April 14, 2026 20:48
@mihnita
Copy link
Copy Markdown
Contributor Author

mihnita commented Apr 14, 2026

I've added ALLOW_MANY_COMMITS=true, assuming that we want to keep the 3 (clean) commits.

Copy link
Copy Markdown
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

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

rslgtm

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.

3 participants