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

Merged
merged 1 commit into from
Jan 21, 2025

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 5 times, most recently from be3f89e to a703c33 Compare January 20, 2025 09:42
@graalvmbot graalvmbot changed the title [GR-54978] [GR-59135 ] Report unrecognized/ill-formed hosted options in NI driver [GR-54978] [GR-59135 ] Report unrecognized/ill-formed hosted options in NI driver. Jan 21, 2025
@graalvmbot graalvmbot changed the title [GR-54978] [GR-59135 ] Report unrecognized/ill-formed hosted options in NI driver. [GR-54978] [GR-59135] Report unrecognized/ill-formed hosted options in NI driver. Jan 21, 2025
@graalvmbot graalvmbot closed this Jan 21, 2025
@graalvmbot graalvmbot deleted the paw/GR-54978 branch January 21, 2025 23:12
@graalvmbot graalvmbot merged commit e358584 into master Jan 21, 2025
13 checks passed
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