Skip to content

fix(parser): Track the most explicit value source#3334

Merged
epage merged 1 commit intoclap-rs:masterfrom
epage:source
Jan 24, 2022
Merged

fix(parser): Track the most explicit value source#3334
epage merged 1 commit intoclap-rs:masterfrom
epage:source

Conversation

@epage
Copy link
Copy Markdown
Member

@epage epage commented Jan 24, 2022

We were only tracking the last value source (default, env, cli, etc).
This works for args because they only come from one source. Groups
however can come from multiple sources and this was making us treat a
group with a default value as being completely from defaults despite
some values maybe being from the commandline.

We now track the highest precedence value for a group.

Fixes #3330

We were only tracking the last value source (default, env, cli, etc).
This works for args because they only come from one source.  Groups
however can come from multiple sources and this was making us treat a
group with a default value as being completely from defaults despite
some values maybe being from the commandline.

We now track the highest precedence value for a group.

Fixes clap-rs#3330
@epage epage merged commit af55024 into clap-rs:master Jan 24, 2022
@epage epage deleted the source branch January 24, 2022 16:51
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.

Conflicting args both present

1 participant