-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] feat: java/graalvm 21+ support #3
Draft
sgammon
wants to merge
29
commits into
main
Choose a base branch
from
feat/jvm21plus
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains 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
- fix: support up to graalvm/jdk 23 (latest) - fix: don't use `gu` tool for modern graalvm versions - fix: coordinate change for `shadow` plugin (`com.gradleup.shadow`) - fix: build with `--add-modules=jdk.unsupported` where needed - fix: use jdk21 to run the tests (needed for `Unsafe.ensureInitialized`) - fix: truffle svm dependency is required after graalvm `24.0.0` - chore: bump graalvm → `24.1.0` - chore: bump shadow → `8.3.5` Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
Signed-off-by: Sam Gammon <[email protected]>
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.
Summary
Note: Filed upstream as apple#876
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 23, test against Java 21, and imply no change to bytecode (i.e. still only requiring Java 17+ to run or transitively compile against Pkl).
Java 21 adds a lot of features, and JPMS enforcement (and related deprecations) are a concern. This PR takes care of those but does not modularize Pkl itself.
Warning
This PR adds Github Actions jobs for building and testing Pkl. These should be rebased away before any contemplated merge; they are here only to exercise tests on this fork.
This PR does not contemplate modularization support for Pkl (JPMS).
Rationale
JVM 21 support: Needed for modern Java projects to embed Pkl; needed for modern GraalVM
native-image
binaries built with embedded Pkl.GVM 23 toolchain: Support for the latest release version of GraalVM and Truffle brings many improvements to the compiler and polyglot implementation
JVM 21-pinned test toolchain: Tests run under JVM 21. It's annoying to have two JDKs here, but JDK 23 is best, and JDK 21 is needed for JVM execution of Truffle implementation tests, due to a dependency on
sun.misc.Unsafe.ensureInitialized
, which was removed in JDK 22.Gradle
8.12
: Needed for Gradle to be able to understand class targets as high as65
, which corresponds to JVM 23.Shadow
8.3.5
: Necessitated by a plugin ID change (com.github.johnrengelman.shadow
→com.gradleup.shadow
), to enable support for JVM 21+Truffle SVM Dependency: Certain superclasses used by Pkl (notably,
AbstractTruffleException
andTruffleFeature
) have moved to the neworg.graalvm.nativeimage:truffle-runtime-svm
coordinate.Non-relocations for Truffle/GraalVM classes. After the Truffle Unchained transition, Truffle languages and runtime artifacts must be present on the Java module path. By definition, this precludes use in "relocated" form.
Known Issues
pkl-core
)analyzeInvalidHttpModule.pkl
:pkl-core:test:errors > analyzeInvalidHttpModule.pkl
:pkl-core:testJavaExecutable:errors > analyzeInvalidHttpModule.pkl
pkl-doc
)pkl-executor
)Pre-merge Checklist
Changelog
gu
tool for modern graalvm versionsshadow
plugin (com.gradleup.shadow
)--add-modules=jdk.unsupported
where neededUnsafe.ensureInitialized
)24.0.0
24.1.1
8.3.5
8.12