-
I am currently working on enhancing the native-image support for a library that isn't mine. I have no say over the release cadence and the used JDK, so to make sure compilation always works I am adding the <dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>22.3.0</version>
<optional>true</optional>
</dependency> Is this the proper way to add support for current and upcomming GraalVM releases? In my understanding, for the end-user this would make sure that the In the future, would the proper way be to add a dependency to the most recent LTS release? So that would be In a project using the module system, does adding the requirement to /cc @fniephaus |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hi @kkriske, Thanks for raising this. Lots of interesting but complicated questions. Let me try to answer them one by one as well as I can...
I'd say it is the proper way to add support for a specific GraalVM release. Maven typically requires a specific version, so you can't say use the latest version of some dependency. If it helps, you could make the GraalVM version adjustable with something like: <properties>
<!-- ... -->
<graalvm-version>22.3.0</graalvm-version>
</properties>
<dependency>
<groupId>org.graalvm.sdk</groupId>
<artifactId>graal-sdk</artifactId>
<version>${graalvm-version}</version>
<optional>true</optional>
</dependency> and then overwrite the version via, for example,
I just tried this out myself and indeed, it seems to be the case that the
I guess it depends on the things you need in the library. What if you want to use an API that was introduced or deprecated after the most recent LTS release?
Yes, I think that is the case. I'm afraid I couldn't answer all your questions entirely but I hope this helps. We are in the bizarre situation where GraalVM has both a public API and JDK distributions. As you probably know, we are aligning with the OpenJDK and not all details have been figured out yet (e.g., maybe we need to split |
Beta Was this translation helpful? Give feedback.
Hi @kkriske,
Thanks for raising this. Lots of interesting but complicated questions. Let me try to answer them one by one as well as I can...
I'd say it is the proper way to add support for a specific GraalVM release. Maven typically requires a specific version, so you can't say use the latest version of some dependency. If it helps, you could make the GraalVM version adjustable with something like: