Make Command::args_overrides_self
the default
#4261
Labels
A-parsing
Area: Parser's logic and needs it changed somehow.
C-enhancement
Category: Raise on the bar on expectations
M-breaking-change
Meta: Implementing or merging this will introduce a breaking change.
S-waiting-on-decision
Status: Waiting on a go/no-go before implementing
We had talked about swapping the default for 3.0 but punted.
When working on
ArgAction
during 3.2, I modeled it after Python'sargparse
which only supports overriding, makingargs_overrides_self
the only behavior for the new actions.When switching cargo to the new actions, some tests specifically checking for self-conflicts failed. This reminded me that in cargo 1.64.0,
--target
switched from amultiple_occurrences(false)
tomultiple_occurrences(true)
. This was a switch from an error case to a working case. Ifargs_overrides_self
had been on, it would have been a switch from a working case to a working case, being a change in working behavior.We decided in 4.0.0 to defer a decision on the behavior and bring back
args_overrides_self
, making the new actions behave like the old ones,So to summarize
args_overrides_self(true)
alias ls='ls -xyz'
would be safe to repeat some of those flagdSo should we switch to it being on by default, only on, or maintain status quo?
Notes
argparse
args_overrides_self(true)
was setrm -fffff file
).touch -d 'Jan 1 1970' -d 'Dec 31 2400' file
will use the latter timestamp.The text was updated successfully, but these errors were encountered: