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-58214] Respect order of arguments for explict main class and image name. #9768

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

Conversation

graalvmbot
Copy link
Collaborator

This PR fixes a long standing bug in the native-image driver. native-image allows positional arguments for specifying the main class name and the image name. Previously those positional arguments always won even if a later option states something else for class name or image name.

E.g.

native-image -cp hello.jar MyAppHello hello -o hello-image

Previously the built image would be named hello and the -o hello-image would not been able to change that even though it comes after the hello positional argument.
Now this is fixed and the image would be named hello-image as it should be.

This bug was especially annoying in the context of native-image bundles. E.g. If a bundle gets created with e.g.

native-image --bundle-create -jar foobar.jar foobar

it was impossible to rebuild that bundle and have it build the image with custom name. I.e.

native-image --bundle-apply=foobar.nib -Os -o foobar_optimized

would still have produced an image named foobar. Now with this fixed it produces an image named foobar_optimized.

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Sep 26, 2024
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