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-54978] [GR-59135 ] Report unrecognized/ill-formed hosted options in NI driver #10485

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

graalvmbot
Copy link
Collaborator

This PR greatly improves reporting of unknown or ill-formed hosted options in the driver.
For a bougus command line like native-image -H:UnlockExperimentalVMOptions -H:+UnlockExperimentalOptions -H:-StaticExecutable -H:-UnlockExerimentalVMOptions --macro:jvmcicompiler-library, instead of showing incorrect & misleading results like

Warning: The option '-H:+UnlockExperimentalOptions' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.
Warning: The option '-H:+UnlockExerimentalVMOptions' is experimental and must be enabled via '-H:+UnlockExperimentalVMOptions' in the future.

that make the user think those are actual NI options, we now get

Error: Ill-formed native-image hosted-option '-H:UnlockExperimentalVMOptions' ('=' missing after option name) from command line

after fixing the command line we show

Error: Unrecognized option '-H:UnlockExperimentalOptions' from command line. Did you mean one of these: '-H:±UnlockExperimentalVMOptions'. Use '--expert-options' (see also '--help-extra') to list all available options.

Any hosted option that the builder does not support is immediately reported. The driver now also provides suggestions how to fix options that are misspelled or have invalid syntax. And all of that happens without ever calling the builder.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 15, 2025
@graalvmbot graalvmbot force-pushed the paw/GR-54978 branch 3 times, most recently from a421a0c to 766be3f Compare January 16, 2025 15:44
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