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): Only add ArgGroup to ArgMatches for command-line #4375

Merged
merged 7 commits into from
Oct 12, 2022

Conversation

epage
Copy link
Member

@epage epage commented Oct 12, 2022

This will fix clap_derives behavior for optional-flattened groups as
it will properly detect when the group is present (#3566).

While I consider this a bug and not part of compatibility guarentees, I
still want to keep in mind user impact which could still prevent this.
Defaults will make the group always-present which has little value and
if anything is relying on this, it is probably an application bug.

Since groups are only associated with the occurrence, we can move the
assigning of it to the occurrence start.

This will help centralize other checks
This will fix `clap_derive`s behavior for optional-flattened groups as
it will properly detect when the group is present (clap-rs#3566).

While I consider this a bug and not part of compatibility guarentees, I
still want to keep in mind user impact which could still prevent this.
Defaults will make the group always-present which has little value and
if anything is relying on this, it is probably an application bug.
@epage epage merged commit f0223a4 into clap-rs:master Oct 12, 2022
@epage epage deleted the group2 branch October 12, 2022 13:20
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.

1 participant