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

Passing --native-option=--verbose doesn't work #1786

Closed
zakkak opened this issue Apr 3, 2024 · 4 comments · Fixed by #1790
Closed

Passing --native-option=--verbose doesn't work #1786

zakkak opened this issue Apr 3, 2024 · 4 comments · Fixed by #1790
Labels
bug Something isn't working

Comments

@zakkak
Copy link
Contributor

zakkak commented Apr 3, 2024

Describe the bug
Native image supports building with --verbose option, but jbang refuses to accept it (probably because it conflicts with its own --verbose option) with:

$ jbang -n --native-option=--verbose Hello.java                                                                                             
Expected parameter for option '--native-option' but found '--verbose'

To Reproduce

jbang init Hello.java
jbang -n --native-option=--verbose 

Expected behavior
The native build should proceed with verbose logging (for the native image build) enabled

JBang version

$ jbang version --verbose                      
[jbang] [0:134] jbang version 0.116.0
@zakkak zakkak added the bug Something isn't working label Apr 3, 2024
@quintesse
Copy link
Contributor

quintesse commented Apr 3, 2024

This actually seems to be an issue with PicoCli, investigating if we can somehow convince it to accept this.

PS: it happens with the -D option as well.
PS2: and it happens trying to pass any of the allowed flags (eg. -N=--fresh, but not -N=--foo)
PS3: upgrading to the latest picocli version doesn't affect this issue.

@quintesse
Copy link
Contributor

Ok, found the solution: https://picocli.info/#_enable_consuming_option_names_or_subcommands

@quintesse
Copy link
Contributor

Ok, created a fix for this. Thanks for the issue @zakkak !

@zakkak
Copy link
Contributor Author

zakkak commented Apr 3, 2024

Thanks for the quick fixes @quintesse !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants