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

fix(parser): Don't panic with conflicts and groups #5306

Merged
merged 1 commit into from
Jan 15, 2024

Conversation

epage
Copy link
Member

@epage epage commented Jan 15, 2024

With #5298, I had overlooked that matcher.arg_ids() includes ArgGroups. I had assumed I could always find a present id among Args and unwraped.

I skipped a test for this because the use case is a bit strange that the long term value for the test would likely be low.
If/when we add derive support for args_conflicts_with_subcommands, it will then cover this case.

Fixes #5304

With clap-rs#5298, I had overlooked that `matcher.arg_ids()` includes
`ArgGroup`s.  I had assumed I could always find a present `id` among
`Arg`s and `unwrap`ed.

I skipped a test for this because the use case is a bit strange that the
long term value for the test would likely be low.
If/when we add derive support for `args_conflicts_with_subcommands`, it
will then cover this case.

Fixes clap-rs#5304
@epage epage merged commit d1d88ae into clap-rs:master Jan 15, 2024
22 checks passed
@epage epage deleted the conflict branch January 15, 2024 16:19
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

Successfully merging this pull request may close these issues.

Panics when args_conflicts_with_subcommands(true)
1 participant