-
Notifications
You must be signed in to change notification settings - Fork 11
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
comma separated features #34
Comments
Yes, this has been lacking. The reason the proposed fix didn't work is because it assumed the value parser's type would be There is no way to implement this without a breaking change. We either need to make the fields private and do our own splitting or we need to do a Ideally, clap would allow having multiple delimiters and it'd just do it for us but unsure how I feel about the API for that from clap's side. |
Yeah, this doesn't feel like a particular common feature!
I don't think users should have to deal with a |
Forgot to mention, some downsides
We could just keep all the fields public and add a function. The problem will be people who don't realize its there and directly access it. An alternative would be to rename the field Thoughts? |
I don't think that works with multiple occurrences?
We could add a
Wow, dynamic completion sounds awesome! Seems more of a drawback overall that cargo itself won't be able to benefit from that... Maybe adding multiple delimiter support to clap is a better option than a workaround here, so that cargo can also use it? |
cargo allows features to be a comma or space separated string. This crate only allows features to be space separated.
(I tried fixing myself, but it's not obvious to me how to fix this with clap's value parser - I expected https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=5c27f13cdd493d2271c589e7464497c3 to work, but I hit a panic in clap.)
The text was updated successfully, but these errors were encountered: