Skip to content

Build the package trees on JDK 25, the runner's default - #140

Draft
jwrosewell wants to merge 3 commits into
rcfrom
fix/pmd-jdk25
Draft

jwrosewell wants to merge 3 commits into
rcfrom
fix/pmd-jdk25

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The problem

The four package trees do not build on JDK 25. In the runs below ubuntu-latest ran the ubuntu-26.04 image, whose default JDK is 25.0.5, as did main's nightly on 14 November. The nightly's package build (ci/build-package.ps1, which runs common-ci's java/build-package.ps1) uses the runner's default JDK, while the test jobs take theirs from ci/options.json. So main's Nightly Pipeline 43550377629 stopped in its Build job, in the PMD check of the pipeline tree, and Java's badge on the CI dashboard cannot go green.

Building on JDK 25 stops in three places, one after the other.

  1. PMD 7.7.0 cannot read Java 25 class files. The four trees set maven-pmd-plugin.version to 3.26.0, which runs PMD 7.7.0, and its check-resources-closed check fails with "Unsupported class file major version 69" and a StackOverflowError.
  2. javac 23 and later warn about a doc comment attached to nothing. pipeline.did compiles in the OWID source from the pipeline/owid-java submodule, and PublicKeySchedule.java line 136 at owid-java 23d8da13 has a doc comment whose method is gone. The module compiles with -Xlint:all and -Werror, so the warning stops the build. 23d8da13 is also owid-java's newest commit.
  3. The same warning in a test of this repository. EvidenceKeyFilterShareUsageTests.java line 59 has a doc comment followed by another, so it documents nothing. Tests are compiled even when they are skipped, so the test compile of pipeline.engines.fiftyone stops there.

The rule

The repositories build with whatever toolchain the runner has. None pins its JDK to dodge a newer runner, and when a newer toolchain breaks a build, the project is fixed so that it builds with it. So the fix here is a PMD that reads Java 25 and code that compiles cleanly on it, not a JDK chosen for the package build.

What changed

  • a347d10e sets maven-pmd-plugin.version to 3.28.0, which runs PMD 7.17.0, in pipeline/pom.xml, device-detection/pom.xml, ip-intelligence/pom.xml and location/pom.xml. The examples' poms move in #137.
  • 866d517b adds a profile to pipeline/pipeline.did/pom.xml, active only on JDK 23 and later, that appends -Xlint:-dangling-doc-comments to the module's compiler arguments. Earlier javac does not know the check's name, which is why it is a profile, and every other check and -Werror stay as they were.
  • 50331fbf removes the comment attached to nothing from EvidenceKeyFilterShareUsageTests, which described defaults that no test below it covers.

Tests

Each run built the four trees one after another with mvn install -DskipTests -DskipNativeBuild=true on ubuntu-latest with its default JDK, as the nightly's package build does, through a throwaway workflow.

  • Red 43613120663, rc at b33daa0, JDK 25.0.5. The pipeline tree stops in pmd:3.26.0:check (check-resources-closed) with "Unsupported class file major version 69" and StackOverflowError.
  • 43613120645, with a347d10 only. PMD passes, and pipeline.did stops on the OWID doc comment.
  • 43613917275, with 866d517 as well. pipeline.did builds, and the test compile of pipeline.engines.fiftyone stops on the comment in EvidenceKeyFilterShareUsageTests.
  • Green 43614539640, this head. All four trees build on JDK 25.0.5.

The same green ran the pipeline tree's tests on JDK 25.0.5 with no keys, to see what else JDK 25 changes. Every test that needs no key passed, apart from the 73 tests of the JavaScript Builder that run the script in GraalJS (under What remains). The 51Did, Cloud Request Engine and cloud developer example live tests failed for want of a key, as they do anywhere without one.

Full build

Run 43615277152 built 50331fb merged with rc (b33daa0) on nine configurations, Ubuntu x64 with Java 8, 11, 17 and 21, Ubuntu arm64 with Java 17, and Windows with Java 8, 11, 17 and 21, and every job passed. EvidenceKeyFilterShareUsageTests passed 10 of 10 in all nine jobs. Each of its ten Setting 'PullRequestSha' lines names 50331fb, and its Configure job printed "Left out 6 macOS entries".

macOS was left out of this draft's full build under the 9 November decision. The rc head is built with macOS before it merges into main.

Nightly

Nightly Pipeline 43615278064 ran with dryrun set to true on tmp/java-nightly-65, whose head is this draft's head, 50331fb. Its Build job, the package build that stopped main's nightly, ran on the ubuntu-26.04 image with pmd:3.28.0:check and passed. Every other job passed too, being the submodule, package and data file updates, the seven Pre Build and seven Test jobs of Nightly Publish (macOS included), Package, ComparePerformance, and the fifteen Build and Test jobs of Nightly Pull Requests, apart from the two Report Compare Performance jobs, which were skipped.

Base branch

rc at b33daa0. #132, which also changes EvidenceKeyFilterShareUsageTests.java, has merged into rc since, and a trial merge of the head with rc at 32b3784 is clean.

What it releases

The four parent poms change, so under version per package (#63) every package of the four trees is released, which Monday's plan does already. pipeline.did and pipeline.engines.fiftyone change too, and both are in that plan.

What remains

  • GraalJS 22.0.0.2, which the JavaScript Builder's tests run the script in, cannot start on JDK 22 and later (NoSuchMethodError for sun.misc.Unsafe.ensureClassInitialized), so the tests cannot run on JDK 25 and ci/options.json cannot take a Java 25 entry yet. #152 tracks it.
  • pipeline.javascriptbuilder declares GraalJS at compile scope although no code under src/main uses it. #153 tracks it.
  • The stray doc comment belongs in owid-java, which is outside this repository. Once owid-java removes it and the submodule moves, the profile in pipeline.did can go.

PMD 7.7.0, which maven-pmd-plugin 3.26.0 runs, cannot read Java 25
class files, so the package build stops in pipeline.core's
check-resources-closed check on a JDK 25. The nightly's package build
uses the runner's default JDK, which is now 25 on ubuntu-latest.
maven-pmd-plugin 3.28.0 runs PMD 7.17.0, which reads them.
…d later

javac 23 added a lint check for a documentation comment attached to no
declaration. The OWID source that pipeline.did compiles in has one
(PublicKeySchedule.java line 136 at owid-java 23d8da13), and the
module compiles with -Xlint:all and -Werror, so the build stops there on
JDK 25. A profile active only on JDK 23 and later adds
-Xlint:-dangling-doc-comments, as earlier javac does not know the name.
…sageTests

javac 23 and later warn about it, and -Werror makes the warning stop the
test compile of pipeline.engines.fiftyone on JDK 25. The comment
described defaults no test below it covers.
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.

1 participant