mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
[PR #876] [MERGED] JDK 21 toolchain #782
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/876
Author: @sgammon
Created: 1/6/2025
Status: ✅ Merged
Merged: 2/3/2025
Merged by: @bioball
Base:
main← Head:feat/jvm21plus-upstream📝 Commits (2)
8b29630feat: graalvm jdk21 toolchain87a03afchore: update circleci jobs for multi-jdk testing📊 Changes
37 files changed (+747 additions, -181 deletions)
View changed files
📝
.circleci/config.pkl(+3 -8)📝
.circleci/config.yml(+33 -58)📝
.circleci/jobs/GradleJob.pkl(+1 -0)📝
.java-version(+1 -1)📝
DEVELOPMENT.adoc(+2 -2)📝
bench/gradle.lockfile(+8 -3)📝
buildSrc/build.gradle.kts(+18 -4)📝
buildSrc/settings.gradle.kts(+3 -1)📝
buildSrc/src/main/kotlin/BuildInfo.kt(+266 -3)📝
buildSrc/src/main/kotlin/InstallGraalVm.kt(+12 -6)➕
buildSrc/src/main/kotlin/JavaVersionRange.kt(+64 -0)📝
buildSrc/src/main/kotlin/pklFatJar.gradle.kts(+18 -4)📝
buildSrc/src/main/kotlin/pklGradlePluginTest.gradle.kts(+1 -1)📝
buildSrc/src/main/kotlin/pklJavaLibrary.gradle.kts(+64 -7)📝
buildSrc/src/main/kotlin/pklKotlinLibrary.gradle.kts(+8 -2)📝
buildSrc/src/main/kotlin/pklKotlinTest.gradle.kts(+5 -2)📝
docs/gradle.lockfile(+6 -2)📝
docs/src/test/kotlin/DocSnippetTests.kt(+1 -0)📝
gradle.properties(+2 -0)📝
gradle/libs.versions.toml(+9 -7)...and 17 more files
📄 Description
Summary
This PR updates dependencies and build process for Pkl to bring GraalVM and Truffle support up to their latest versions. Today, Pkl builds against Java 17+, and requires Java 17+ to run.
After merging this PR, Pkl would build against Java 21, test against Java 21, and impose no change to lib consumers (i.e. still only requiring Java 17+ to run or transitively compile against Pkl).
Test downstream here (updated), via Github Actions. On that fork PR, the change set is expressed in full, with fixups.
PR Tree
Rationale
Gradle Toolchains: Uses Gradle's toolchains feature to provision and use different versions of the JDK.
JDK 21 Toolchain: Builds (and tests) occur under JDK 21, with bytecode targeting JVM 17. Build bytecode adopts JVM 21 to accelerate build tooling with no change to lib consumers.
Truffle SVM Dependency: Certain superclasses used by Pkl (notably,
AbstractTruffleExceptionandTruffleFeature) have moved to the neworg.graalvm.nativeimage:truffle-runtime-svmcoordinate.Multi-JDK testing: Adds stronger guarantees for backward compatibility with regard to Pkl and JVM execution (i.e.
java -jar ...with a fat JAR). Tests against versions 18-23 with test suites andjava -jar ...executions.Known Issues
pkl-gradle)--add-exports=...Pre-merge Checklist
Changelog
-PnativeArch=nativeto build with-march=nativejvm-test-suitepluginjpkl evalon multiple jdksUnsafe.ensureInitialized)24.0.0--add-modules=jdk.unsupportedwhere neededgutool for modern graalvm versionsThrowableinstead of deprecated-for-removalThreadDeath24.1.2buildSrc🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.