Skip to content

[build] Add JDK 22–27+ support via consolidated jdk22plus profile - #146

Open
stratika wants to merge 7 commits into
mainfrom
feat/tornadovm-jdk27
Open

[build] Add JDK 22–27+ support via consolidated jdk22plus profile#146
stratika wants to merge 7 commits into
mainfrom
feat/tornadovm-jdk27

Conversation

@stratika

@stratika stratika commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Extends GPULlama3.java's JDK support from {21, 25} to 21 plus an open-ended 22+ range (22, 23, 24, 25, 26, 27, and future releases), tracking TornadoVM's own move to a single consolidated jdk22plus SDK build. Replaces the short-lived per-version jdk25/jdk26/jdk27 Maven profiles with one
jdk22plus profile, fixes llama-tornado to handle JDK 27's removal of JVMCI, and updates all docs/release automation to match.

Why

  • TornadoVM dropped separate jdk25/jdk26/jdk27 dev builds in favor of one jdk22plus SDK that runs unchanged across the whole range — this repo's pom.xml had drifted into three near-duplicate profiles chasing that per-version, which was both unnecessary and left a JDK 26.x activation gap.
  • JDK 27 removed the platform jdk.internal.vm.ci module entirely (8382582: Remove the experimental JVMCI feature openjdk/jdk#30834); -XX:+EnableJVMCI became a fatal unrecognized VM option and TornadoVM ships a vendored jdk.internal.vm.ci module to compensate. llama-tornado needed to detect this and branch its JVM flags accordingly instead of
    always assuming JVMCI is present.

Changes

pom.xml

  • Collapsed jdk25/jdk26/jdk27 into one jdk22plus profile, activation [22,) — closes the JDK 26.x activation gap that existed between the old jdk25 ([25.0.2,)) and a since-added jdk26 profile.
  • Bumped tracked TornadoVM base version to 5.2.1, parameterized via tornadovm.dev.suffix (defaults to -dev for local/CI builds against a dev TornadoVM checkout, stripped to empty in the release profile so real releases resolve the plain GA coordinate).
  • jdk22plus drops --enable-preview (FFM is final since JDK 22) and compiles with --add-modules jdk.incubator.vector only (Vector API still incubating through at least JDK 27 / JEP 508).

llama-tornado

  • Detects the running JDK's major version from $JAVA_HOME/bin/java -version.
  • JDK 27+: skips -XX:+EnableJVMCI/--enable-preview, sets -Djdk.internal.vm.ci.enabled=true and the --add-exports needed by TornadoVM's vendored jdk.internal.vm.ci module, and puts that module on the module path.
  • JDK 22–26: patches in TornadoVM's frozen JDK-21-shaped jvmci-21.0.2.jar via --patch-module, since the platform jdk.vm.ci.* interfaces on those releases have drifted from what the reflection providers were compiled against.
  • Mirrors the branching TornadoVM's own tornado.py/tornado --printJavaFlags already does, since this script builds its Java invocation independently.

.github/workflows/deploy-maven-central.yml

  • Matrix entry jdk25/25.0.2-openjdk22plus/25.0.2-open (one build within the range now covers publishing the whole jdk22plus artifact; noted that GA 5.2.1-jdk22plus isn't on Maven Central yet, only the -dev line, so this entry will fail resolution until TornadoVM cuts that GA release — same
    caveat the prior jdk26/jdk27 note carried).

.github/workflows/prepare-release.yml

  • README dependency-snippet generator updated from jdk21/jdk25 to jdk21/jdk22plus (was still hardcoding the now-removed jdk25 profile, which would have written broken artifact coordinates on the next release).

README.md

  • Prerequisites, Java badge, and Maven/Gradle snippets updated from 21, 25 to 21, 22+ (22–27+) / jdk22plus.

.claude/skills/build-n-run-engine/SKILL.md, .claude/skills/build-tornado/SKILL.md

  • Prerequisite JDK lists updated from 21, 25, or 27 to 21, or 22+ (22–27+); build step notes updated to describe the consolidated jdk22plus profile instead of per-version jdk25/jdk27.

Testing

  • Build on JDK 21 (jdk21 profile)
  • Build on JDK 22–26 (jdk22plus profile, --patch-module JVMCI path)
  • Build on JDK 27 (jdk22plus profile, no-JVMCI path)

stratika and others added 7 commits August 4, 2026 17:25
jdk26 and jdk27 hardcoded the TornadoVM dev artifact version
(5.2.1-jdk26-dev, 5.2.1-jdk27-dev) as literal strings instead of
composing it like jdk21/jdk25 do. Add tornadovm.dev.suffix (-dev)
and have jdk26/jdk27 locally override tornadovm.base.version to
5.2.1, then compose tornadovm.version the same way the other
profiles do: ${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix}.
jdk26/jdk27 compose tornadovm.version with tornadovm.dev.suffix
(default "-dev") since no GA TornadoVM release exists yet for those
JDKs, only locally-built dev artifacts. That property is the actual
dependency version for tornado-api/tornado-runtime, so a real
`mvn deploy -P release` would otherwise publish a POM depending on
an unresolvable *-dev coordinate. Clear it in the release profile,
mirroring the existing maven.javadoc.skip/gpg.skip override pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pom.xml: jdk21/jdk25 composed tornadovm.version without
tornadovm.dev.suffix, unlike jdk26/jdk27. Once tornadovm.base.version
was bumped to 5.2.1 (current TornadoVM dev target; GA not yet
published) this broke default builds on JDK 21/25: they tried to
resolve the bare tornado-api/tornado-runtime:5.2.1-jdk{21,25}
coordinate, which doesn't exist yet (only the "-dev" line does).

Make all four profiles compose tornadovm.version the same way:
${tornadovm.base.version}${jdk.version.suffix}${tornadovm.dev.suffix}.
tornadovm.base.version is now the single knob for "which TornadoVM
tag are we tracking" - testing/default builds get "-dev" appended
(matches a locally-built TornadoVM checkout), and the release profile
strips it to resolve the plain GA coordinate instead. Also drops the
now-redundant per-profile tornadovm.base.version override in
jdk26/jdk27 and refreshes stale profile comments accordingly.

deploy-maven-central.yml: documents (commented out) the jdk26/jdk27
matrix entries to add once TornadoVM's 5.2.1 GA is actually published
for those JDKs - left disabled for now so the release pipeline
doesn't attempt a deploy that's guaranteed to fail on dependency
resolution.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
TornadoVM consolidated its old per-version jdk25/jdk26/jdk27 dev
profiles into a single jdk22plus SDK build that runs unchanged across
JDK 22-27+ (one build, floor-compiled at release 22 - see TornadoVM's
own pom.xml). Mirror that here instead of maintaining three near-
identical profiles that only differed in the revision string:

- jdk21 narrowed to [21,22), now that jdk22plus covers the rest
- jdk25/jdk26/jdk27 replaced by one jdk22plus profile, activation
  [22,), suffix -jdk22plus, publishing gpu-llama3:${revision}-jdk22plus
- Drops --enable-preview (FFM, the only reason jdk21 needs it, is final
  since JDK 22) via combine.self="override", keeping only add-modules
  jdk.incubator.vector - exactly what the former jdk27 profile already
  proved compiles clean, now applied across the whole [22,) range
- deploy-maven-central.yml: renamed the jdk25 matrix entry to
  jdk22plus (still built on 25.0.2-open, just no longer a jdk25-only
  artifact) and dropped the jdk26/jdk27-held-back note - one published
  *-jdk22plus artifact now serves that whole range, no separate
  matrix entries needed once TornadoVM publishes a 5.2.1 GA release

Verified `./mvnw clean package -DskipTests` on JDK 25 resolves
tornado-api/tornado-runtime:5.2.1-jdk22plus-dev and produces
gpu-llama3-1.0.0-jdk22plus.jar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pom.xml collapsed the old per-version jdk25/jdk26/jdk27 profiles into
one jdk22plus profile ([22,)). Bring docs and release automation in
line:

- README.md: Prerequisites bullet, Java badge, and Maven/Gradle
  dependency snippets now reference jdk21/jdk22plus instead of the
  removed jdk25 profile.
- prepare-release.yml: the README-snippet generator was still
  hardcoding jdk25/-jdk25, which would have written broken artifact
  coordinates on the next release since that profile no longer
  exists. Now generates jdk21/jdk22plus.
- build-n-run-engine/SKILL.md, build-tornado/SKILL.md: prerequisite
  JDK lists updated from "21, 25, or 27" to "21, or 22+ (22-27+)".
@stratika
stratika requested a review from mairooni August 12, 2026 15:29
@stratika stratika self-assigned this Aug 12, 2026
@stratika stratika added the enhancement New feature or request label Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant