Skip to content

ci: add Java 25 to the JNI build-and-test matrix#7391

Open
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:ci/java25-build-test
Open

ci: add Java 25 to the JNI build-and-test matrix#7391
LuciferYang wants to merge 1 commit into
lance-format:mainfrom
LuciferYang:ci/java25-build-test

Conversation

@LuciferYang

@LuciferYang LuciferYang commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Java 25 (the September 2025 LTS) to the build-and-test-java matrix in .github/workflows/java.yml, so the JNI bindings are built and tested on the current LTS alongside 11/17/21. The build targets maven.compiler.release 11, so the newer JDK only affects the build/test runtime, not the emitted bytecode.

With spotless excluded on Java 25 (see below), mvn install — the full build plus all JNI tests — passes cleanly on JDK 25, so the bindings themselves are JDK-25-ready.

Why spotless is skipped on Java 25

The spotless / google-java-format format gate cannot run on JDK 25, and bumping the formatter is not a viable alternative while 11/17 stay in the matrix:

  • google-java-format 1.22.0 (pinned via spotless) calls com.sun.tools.javac.util.Log$DeferredDiagnosticHandler.getDiagnostics(), whose signature changed in JDK 25 → NoSuchMethodError.
  • The first gjf release with JDK 25 support is 1.34.0, but gjf ≥ 1.29 requires JDK 21+ to run — so it would fail the Java 11 and 17 jobs with UnsupportedClassVersionError. No gjf release runs on 11/17 and supports 25. (A trial bump 1.22 → 1.27 also reformatted 0 of 190 files, i.e. no formatting drift to gain.)

Since the format check is JDK-independent and stays enforced on 11/17/21, Java 25 is excluded from it. spotless is also bound into the Maven build lifecycle (validate phase), so it is skipped in two places on the 25 job:

  • the standalone style step — if: matrix.java-version != '25'
  • the build — mvn install -Dspotless.skip=true (via a matrix-conditioned arg)

Test plan

  • Build and Test with Java 11 / 17 / 21 / 25 all green in CI.

@github-actions github-actions Bot added A-ci CI / build workflows ci Github Action or Test issues labels Jun 22, 2026
@LuciferYang LuciferYang force-pushed the ci/java25-build-test branch from 1e26f1a to 56bfe96 Compare June 22, 2026 13:13
Java 25 is the September 2025 LTS; add it alongside 11/17/21 so the JNI
bindings are exercised on the current LTS. The build targets
maven.compiler.release 11, so the newer JDK only affects the build/test
runtime, not the emitted bytecode.

spotless's google-java-format step cannot run on Java 25: gjf 1.22.0 calls
a com.sun.tools.javac API (Log$DeferredDiagnosticHandler.getDiagnostics)
whose signature changed in JDK 25, and no gjf release runs on JDK 25
without dropping JDK 11/17 support (gjf >= 1.34 supports 25 but requires
JDK 21+ to run). So the format gate is skipped on the Java 25 job only --
it is JDK-independent and stays enforced on 11/17/21. spotless is also
bound into the build lifecycle (validate phase), so the build passes
-Dspotless.skip=true on 25 in addition to skipping the standalone step.
@LuciferYang LuciferYang force-pushed the ci/java25-build-test branch from 56bfe96 to 4162870 Compare June 22, 2026 13:40
@LuciferYang LuciferYang marked this pull request as ready for review June 22, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-ci CI / build workflows ci Github Action or Test issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant