Skip to content
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

[GR-58918] Make HomeFinder.getVersion or equivalent available in org.graalvm.sdk:nativeimage without dependency on polyglot #9831

Open
zakkak opened this issue Oct 7, 2024 · 1 comment

Comments

@zakkak
Copy link
Collaborator

zakkak commented Oct 7, 2024

Feature request

When graal-sdk got split in the four maven artifacts (in GraalVM for JDK 21):

HomeFinder was packaged in org.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.

@zakkak zakkak added the feature label Oct 7, 2024
@selhagani selhagani self-assigned this Oct 7, 2024
@selhagani selhagani changed the title Make HomeFinder.getVersion or equivalent available in org.graalvm.sdk:nativeimage without dependency on polyglot [GR-58918] Make HomeFinder.getVersion or equivalent available in org.graalvm.sdk:nativeimage without dependency on polyglot Oct 7, 2024
@selhagani
Copy link
Member

Hi @zakkak,

Thank you for reaching out to us! I shared this with our dev team and I'll make sure to keep you updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants