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-47647] Introduce -H:±UnlockExperimentalVMOptions. #7190

Merged
merged 17 commits into from
Aug 13, 2023

Conversation

graalvmbot
Copy link
Collaborator

This PR implements Explicit Experimental Option Handling. For now, using experimental options is non-fatal but prints a warning. Explicit unlocking will be required in a future release.

Example

$ native-image -H:+ReportExceptionStackTraces -H:+UnlockExperimentalVMOptions -H:+ExitAfterAnalysis -H:-UnlockExperimentalVMOptions -m jdk.httpserver
Warning: The option '-H:+ReportExceptionStackTraces' is experimental and must be enabled via -H:+UnlockExperimentalVMOptions in the future.
Warning: Please re-evaluate whether any experimental option is required, and either remove or unlock it. The build output lists all active experimental options, including where they come from and possible alternatives. If you think an experimental option should be considered as stable, please file an issue.
========================================================================================================================
GraalVM Native Image: Generating 'jdk.httpserver' (executable)...
========================================================================================================================
[1/8] Initializing...                                                                                    (5.0s @ 0.17GB)
 Java version: 21+30, vendor version: Oracle GraalVM 21-dev+30.1
 Graal compiler: optimization level: 2, target machine: x86-64-v3
 C compiler: gcc (linux, x86_64, 12.3.0)
 Garbage collector: Serial GC (max heap size: 80% of RAM)
 1 user-specific feature(s):
 - com.oracle.svm.thirdparty.gson.GsonFeature
------------------------------------------------------------------------------------------------------------------------
 2 Experimental option(s) in use:
 -H:+ReportExceptionStackTraces
   Origin: command line
 -H:+ExitAfterAnalysis
   Origin: command line
------------------------------------------------------------------------------------------------------------------------
...

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Aug 11, 2023
@graalvmbot graalvmbot force-pushed the fniephaus/GR-47647/experimental-options branch from 8dd5ea5 to c8724bf Compare August 11, 2023 13:56
@graalvmbot graalvmbot force-pushed the fniephaus/GR-47647/experimental-options branch from c8724bf to 9f9b2a0 Compare August 13, 2023 10:08
@graalvmbot graalvmbot merged commit 29dc416 into master Aug 13, 2023
@graalvmbot graalvmbot deleted the fniephaus/GR-47647/experimental-options branch August 13, 2023 11:45
zakkak added a commit to zakkak/quarkus that referenced this pull request Aug 16, 2023
gsmet pushed a commit to zakkak/quarkus that referenced this pull request Aug 17, 2023
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 16, 2023
Starting with Mandrel 23.1 and GraalVM for JDK 21 the use of
`-H:ResourceConfigurationFiles` and `-H:ReflectionConfigurationFiles` is
marked as experimental and requires the use of
`-H::±UnlockExperimentalVMOptions` to avoid warnings (see
oracle/graal#7190), while in the future (planned
for the next release) the presence of this option will be mandatory when
using experimental options (see
oracle/graal#7370).

Furthermore, as described in oracle/graal#7487
Mandrel and GraalVM will also adopt glob patterns in the future (planned
for the next release) and gradually phase out the ability to use exclude
patterns.

The aim of this change is to discourage Quarkus users from creating
their own configuration files.
zakkak added a commit to zakkak/quarkus that referenced this pull request Oct 16, 2023
Starting with Mandrel 23.1 and GraalVM for JDK 21 the use of
`-H:ResourceConfigurationFiles` and `-H:ReflectionConfigurationFiles` is
marked as experimental and requires the use of
`-H::±UnlockExperimentalVMOptions` to avoid warnings (see
oracle/graal#7190), while in the future (planned for the next release)
the presence of this option will be mandatory when using experimental
options (see oracle/graal#7370).

Furthermore, as described in oracle/graal#7487 Mandrel and GraalVM will also adopt glob patterns in the future (planned for the next release) and gradually phase out the ability to use exclude patterns.

The aim of this change is to inform Quarkus users that they are
responsible for keeping such configuration files up to date and to make
clear that they need to start using the
`-H::±UnlockExperimentalVMOptions` option.
holly-cummins pushed a commit to holly-cummins/quarkus that referenced this pull request Feb 8, 2024
Starting with Mandrel 23.1 and GraalVM for JDK 21 the use of
`-H:ResourceConfigurationFiles` and `-H:ReflectionConfigurationFiles` is
marked as experimental and requires the use of
`-H::±UnlockExperimentalVMOptions` to avoid warnings (see
oracle/graal#7190), while in the future (planned for the next release)
the presence of this option will be mandatory when using experimental
options (see oracle/graal#7370).

Furthermore, as described in oracle/graal#7487 Mandrel and GraalVM will also adopt glob patterns in the future (planned for the next release) and gradually phase out the ability to use exclude patterns.

The aim of this change is to inform Quarkus users that they are
responsible for keeping such configuration files up to date and to make
clear that they need to start using the
`-H::±UnlockExperimentalVMOptions` option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants