[GR-58918] Make HomeFinder.getVersion
or equivalent available in org.graalvm.sdk:nativeimage
without dependency on polyglot
#9831
Labels
Feature request
When
graal-sdk
got split in the four maven artifacts (in GraalVM for JDK 21):HomeFinder
was packaged inorg.graalvm.polyglot:polyglot
, as a result to get the native-image version being used during compilation (e.g. in a native image Feature) one needs to either depend on polyglot, even if not using it, or implement a similar API.Is your feature request related to a problem? Please describe.
In Quarkus we implement similar logic to the one offered by HomeFinder.getVersion in quarkusio/quarkus#43696 in order to be able to get the version at build time without depending on polyglot. While that works fine for Quarkus I suspect that it's something useful to a broader audience and would preferably be fixed in GraalVM.
Describe the solution you'd like.
I would like to be able to programmatically get the native-image version at build-time, e.g. in a custom Feature, without the need to bring in the polyglot dependency.
Describe who do you think will benefit the most.
Developers of libraries and frameworks which depend on GraalVM, as they will be able to make compile time decisions based on the GraalVM version being used (e.g. to test new features are adapt to new defaults).
Describe alternatives you've considered.
Quarkus already implements its own alternative.
Express whether you'd like to help contributing this feature
I am willing to implement the solution we will agree on.
The text was updated successfully, but these errors were encountered: