-
Notifications
You must be signed in to change notification settings - Fork 45
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
Positional arguments, parsing scaladocs #58
Comments
Sorry to answer that a bit late...
Maybe auto-recursing can be only enabled via an import. Then I'd fine to merge it I think. |
Positional Arguments
Arguments that are not associated with a flag, that currently go in For example,
Python argparse treats options that don't start with I'm imagining an annotation like
|
My understanding is that these are likely to be required arguments. Beware that there's currently a small glitch in the handling of mandatory arguments in case-app - the help cannot be printed if the mandatory arguments are not specified (like |
Good to know! Just in case I'm missing something that case-app already handles, what do you mean "mandatory arguments"? I'm assuming you mean fields in the arguments-case-class that have no default value provided and therefore must be specified on the CLI in order for the arguments-case-class to be instantiated? |
Yes, that's what I mean. It's quite recent, it's been added in Also, forget my point about the issue with help and these mandatory args, #63 fixes it :-) |
Random other question I asked in the case-app gitter but I'll repost here since that room doesn't seem active yet: I'm trying to port some args4j-based CLI param objects to case-app and one issue I'm facing is that I have sets of arguments defined in traits that I mix in to multiple different apps. I'm wondering whether/how i can mimic that with case-app; as long as a shapeless |
@ryan-williams A |
The Scaladoc parsing could be done using https://github.com/takezoe/runtime-scaladoc-reader |
I can't seem to figure out positional args. Is it documented somewhere? |
@chadselph Seems like positional arguments still go to RemainingArgs. No change has been made to support the @arg proposal right @alexarchambault? |
I think that's right. I've been using |
I love this library, thank you!
Some things I would like to see that afaict it doesn't have now:
case class
for the help-string@Recurse
annotation apparently does); ideally that would just happen automatically, but could be configured to e.g. prepend a string to the front of all the fields in the nested class, or just flatten them into the top-level class's argument/field namepace, etc.I may try to dig in to this when I have a moment, will post any notable updates here
The text was updated successfully, but these errors were encountered: