-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[GR-47647] Explicit Experimental Option Handling #7105
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
Comments
This was referenced Sep 1, 2023
jsmrcka
added a commit
to jsmrcka/quarkus-startstop
that referenced
this issue
Nov 2, 2023
`-H:ReflectionConfigurationResources` - Reported in `netty`: netty/netty#13595. - Fixed in `netty`: netty/netty#13596. - See also similar issue in Karm/mandrel-integration-tests#190 and its workaround in Karm/mandrel-integration-tests#203. `-H:Log=registerResource, -H:Log=registerResource:` - Added explicitly by `APP_FULL_MICROPROFILE` config. - Typical use case documented in Quarkus Native Reference Guide, the documentation was added in quarkusio/quarkus#36494. - Allow-listed, instead of using `-H:+UnlockExperimentalVMOptions` / `-H:-UnlockExperimentalVMOptions`, to avoid errors with GraalVM / Mandrel based on Java < 21, which do not recognize this option (see oracle/graal#7105).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TL;DR
Similar to HotSpot's
-XX:+UnlockExperimentalVMOptions
, we plan to introduce an-H:±UnlockExperimentalVMOptions
option to explicitly unlock access to experimental options in Native Image.Goals
Native Image provides numerous non-API build options (for public API options, see
native-image --help
). To make users more aware of the fact that their Native Image builds rely on experimental options, to prevent misuse, and to help us identify options that users rely on in the first place, we plan to introduce an-H:±UnlockExperimentalVMOptions
option that must be used to explicitly unlock access to experimental build options. If access is not explicitly requested, an attempt to use any experimental option will fail the build with an actionable error message. Using-H:±UnlockExperimentalVMOptions
without actually using any experimental option will print a warning.To allow this option to be used in a composable way, we intend to enforce the following rules:
Experimental options can only be used in an appropriate scope that starts with
-H:+UnlockExperimentalVMOptions
and ends with-H:-UnlockExperimentalVMOptions
.While not encouraged,
-H:-UnlockExperimentalVMOptions
can be left out for convenience. The scope will be closed at the end of the argument list that is currently being processed.Libraries and frameworks can use
-H:±UnlockExperimentalVMOptions
within theArgs
property of theirnative-image.properties
files.To help users understand who or which library or framework requested these options, active experimental options will be listed as part of the build output alongside their origin.
For the initial classification of options, we propose the following:
org.graalvm.compiler.options.Option#stability
to determine if we consider the option stable. I.e. if an option has@Option(stability = OptionStability.STABLE)
, we consider it non-experimental even though it is not an API option.Option#stability
field to classify them as non-experimental. (e.g.com.oracle.svm.hosted.image.CCLinkerInvocation.Options#NativeLinkerOption
).Non-Goals
The text was updated successfully, but these errors were encountered: