-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
org.graalvm.sdk:graal-sdk 23.0.0 artifact no longer JDK 11 bytecode compatible #6831
Comments
Would it be acceptable to compile with compliance level 11 for |
GraalVM 22.3 was compatible with Java 11, while 23.0 is compatible with JDK 17 and 20. |
here is the issue - this means graalvm can't add or change any of the annotations found in svm or the SDK. Or rather you can - but then users with java 11 dependencies will be blocked to use graalvm. The same will happen with all intermediate java releases. So I'm fully grokking the need/want to have the JDK alignment but for these Annotation Jar's what is the technical requirement to force these to move to latest classfile format ? |
The SDK has always been developed in a backward-compatible way so I don't see how this is blocking anyone. Regarding anything in the SVM jars, it's never been supported to depend on that and that indeed requires more complex maintenance for anything that depends on such classes. GraalVM can add new annotations or other classes in the SDK if needed, it just needs to be done in a backward compatible way. If the concern is around
i don't think it would make sense to facilitate depending on newer version of the SDK with older Java versions since anyway there would be no GraalVM version that you can use to leverage the newer features of the API. I would view it the same as "Why compile the Java 21 classes with the latest classfile format?". |
I've updated the description with some use case info. Hope that makes it clearer. |
#6949 integrated the proposed patch: jerboaa@98069bb. |
Thank you! |
I just want to use the graalvm polyglot library - specifically graalvm.js, on a regular JVM. Is support for JVMs older than 17 dropped in 23.0? I didn't see anything in the release notes about that. |
Quarkus does not use that library from graalvm. Youll have ti check with graalvm which parts are supported or not on various jvms. I Can just say that afaik everything was bumped to Java 17. This issue is about at least enable Java 11 compiled libraries to use native image SDK features that targets Java 17. Heads up - Next Release of graalvm in september Will target Java 21. |
I've just verified that the Maven artifacts for graal-sdk version 23.0.1 released a week ago fix this. |
FYI I've created a Quarkus PR to upgrade to this version quarkusio/quarkus#35057 |
I've verified graal-sdk 23.0.1 does not fix this issue. It still says the classfile version on Using Java 11:
|
What is you use-case for using the 23.0 org.graalvm.polyglot API on java 11? The optimized runtime for this version only exists for Java 17 anyway. |
To run JavaScript scripts in an embedded interpreter on the JVM. I don't care about the JIT so much for that case. Nashorn is deprecated - that just leaves graaljs afaik as the only current option for running JavaScript on the JVM. |
Not sure if this a native-image issue. Please transfer to where it's most appropriate.
Issue Description:
The
org.graalvm.sdk:graal-sdk
in version23.0.0
from maven central is no longer consumable by projects compiling to target level11
(for JDK 11 compatibility). That is, those projects would have to at least target JDK 17. This used to work with graal-sdk22.3.x
.Steps to reproduce
git clone https://github.com/jerboaa/reproducers-graal.git && cd reproducers-graal/graal-23-jdk11-compliance-repro
mvn package
This fails with:
Additional info
The change which seems to have introduced this issue is:
#5838
Use case information
The use-case we'd have in mind is this. Be able to run the library with some older JDK, but still have the option to compile the library to native with latest GraalVM (23.0) currently. At the same time, avoid the need to depend on two GraalVM versions to support this. While this substitution example is contrived in the larger framework context those are sometimes needed in order to create leaner apps.
The text was updated successfully, but these errors were encountered: