Prevent user from using both required
and required_unless_present
#3660
Labels
A-builder
Area: Builder API
C-enhancement
Category: Raise on the bar on expectations
E-easy
Call for participation: Experience needed to fix: Easy / not much
M-breaking-change
Meta: Implementing or merging this will introduce a breaking change.
Milestone
Please complete the following tasks
Clap Version
3.1.11
Describe your use case
Given the following pattern:
required_unless_present
will silently be overruled byrequired
, which is confusing.Describe the solution you'd like
Ideally, an error is given to the user so that they are made aware of the conflicting derives (specifically, one that points out to them that
required_unless_present
is sufficient by itself andrequired
is not additionally necessary).Alternatives, if applicable
No response
Additional Context
Coming from this discussion: #3658
The text was updated successfully, but these errors were encountered: