Repository navigation
Build the package trees on JDK 25, the runner's default - #140
Draft
jwrosewell wants to merge 3 commits into
Draft
jwrosewell wants to merge 3 commits into
jwrosewell wants to merge 3 commits into
Conversation
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.
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.
The problem
The four package trees do not build on JDK 25. In the runs below
ubuntu-latestran theubuntu-26.04image, 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'sjava/build-package.ps1) uses the runner's default JDK, while the test jobs take theirs fromci/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.
maven-pmd-plugin.versionto 3.26.0, which runs PMD 7.7.0, and itscheck-resources-closedcheck fails with "Unsupported class file major version 69" and aStackOverflowError.pipeline.didcompiles in the OWID source from thepipeline/owid-javasubmodule, and PublicKeySchedule.java line 136 at owid-java 23d8da13 has a doc comment whose method is gone. The module compiles with-Xlint:alland-Werror, so the warning stops the build. 23d8da13 is also owid-java's newest commit.pipeline.engines.fiftyonestops 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
maven-pmd-plugin.versionto 3.28.0, which runs PMD 7.17.0, inpipeline/pom.xml,device-detection/pom.xml,ip-intelligence/pom.xmlandlocation/pom.xml. The examples' poms move in #137.pipeline/pipeline.did/pom.xml, active only on JDK 23 and later, that appends-Xlint:-dangling-doc-commentsto 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-Werrorstay as they were.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=trueonubuntu-latestwith its default JDK, as the nightly's package build does, through a throwaway workflow.rcat b33daa0, JDK 25.0.5. The pipeline tree stops inpmd:3.26.0:check (check-resources-closed)with "Unsupported class file major version 69" andStackOverflowError.pipeline.didstops on the OWID doc comment.pipeline.didbuilds, and the test compile ofpipeline.engines.fiftyonestops on the comment inEvidenceKeyFilterShareUsageTests.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.EvidenceKeyFilterShareUsageTestspassed 10 of 10 in all nine jobs. Each of its tenSetting '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
dryrunset to true ontmp/java-nightly-65, whose head is this draft's head, 50331fb. Its Build job, the package build that stopped main's nightly, ran on theubuntu-26.04image withpmd:3.28.0:checkand 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
rcat b33daa0. #132, which also changesEvidenceKeyFilterShareUsageTests.java, has merged intorcsince, and a trial merge of the head withrcat 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.didandpipeline.engines.fiftyonechange too, and both are in that plan.What remains
NoSuchMethodErrorforsun.misc.Unsafe.ensureClassInitialized), so the tests cannot run on JDK 25 andci/options.jsoncannot take a Java 25 entry yet. #152 tracks it.pipeline.javascriptbuilderdeclares GraalJS at compile scope although no code undersrc/mainuses it. #153 tracks it.pipeline.didcan go.