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

Support getting GraalVM version at native executable build time #43696

Merged

Conversation

zakkak
Copy link
Contributor

@zakkak zakkak commented Oct 4, 2024

  • Moves core parts of GraalVM.Version to io.quarkus.runtime to
    enable us to use the functionality during native executable build time,
    e.g. from the generated io.quarkus.runner.Feature
  • Infers version from org.graalvm.vendorversion property
  • Avoids breaking existing API
  • Deprecates methods in the deployment package in favor of those in the
    runtime package, so that we can eliminate the former in the future.

This PR restores the functionality we removed in #36037 to avoid the dependency on the polyglot API. Restoring the functionality allows us to generate Feature code conditionally as described in #25975 (comment) which I also need to implement #43533 (reply in thread) in #43448

* Moves core parts of `GraalVM.Version` to `io.quarkus.runtime` to
  enable us to use the functionality during native executable build time,
  e.g. from the generated `io.quarkus.runner.Feature`
* Infers version from `org.graalvm.vendorversion` property
* Avoids breaking existing API
* Deprecates methods in the deployment package in favor of those in the
  runtime package, so that we can eliminate the former in the future.
@quarkus-bot quarkus-bot bot added the area/core label Oct 4, 2024
* @param exportBefore the version of GraalVM before which the package should be exported (exclusive)
* @deprecated use {@link #JPMSExportBuildItem(String, String, GraalVM.Version, GraalVM.Version)} instead
*/
@Deprecated
Copy link
Contributor Author

@zakkak zakkak Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit confusing as it appears like I am adding a Deprecated method, but I actually changed the import and deprecated the method with the old types.

Copy link

quarkus-bot bot commented Oct 4, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 2efe0aa.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@zakkak zakkak requested a review from gastaldi October 7, 2024 06:04
Copy link
Contributor

@gastaldi gastaldi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Any chance to have this class in org.graalvm.sdk:nativeimage in the future?

@zakkak
Copy link
Contributor Author

zakkak commented Oct 7, 2024

LGTM. Any chance to have this class in org.graalvm.sdk:nativeimage in the future?

Yes, that would make sense.

Update: I created oracle/graal#9831

@zakkak zakkak merged commit 1126948 into quarkusio:main Oct 7, 2024
52 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Oct 7, 2024
@zakkak zakkak deleted the 2024-10-04-graalvm-version-at-runtime branch October 7, 2024 11:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants