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

revise syntax for main class designation #166

Closed
maxandersen opened this issue Jul 9, 2020 · 4 comments
Closed

revise syntax for main class designation #166

maxandersen opened this issue Jul 9, 2020 · 4 comments

Comments

@maxandersen
Copy link
Collaborator

after implementing support for doing jbang info.picocli:picocli-codegen:4.2.0/picocli.codegen.aot.graalvm.ReflectionConfigGenerator I realised that specifying the main class that way doesn't work for plain jar based launches, ie. jbang helloworld.jar/blah.main will fail as no (good) way to know /blah.main is not the intended file.

my first thought is to add a --main or similar flag; would also make it much more explicit and code simipler to be honest.

@quintesse wdyt?

@quintesse
Copy link
Contributor

Yes, I think that would be a good idea. For a moment I thought about using #, which is a typìcal thing for UIRLs. But I prefer being explicit with a flag.

@maxandersen
Copy link
Collaborator Author

maxandersen commented Jul 9, 2020

# is treated as a comment in bash thus it will just cancel out everything else.

@quintesse
Copy link
Contributor

Yeah, you'd have to quote the entire argument. So a flag is just better in every way IMO. 👍

@maxandersen
Copy link
Collaborator Author

done; -m/--main now forcefully overrides any main class "calculation" for jar or script running...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants