-
Notifications
You must be signed in to change notification settings - Fork 156
Open
Description
Consider the following grammar:
repeatable(
required("--begin-group-a")
&
(
option("--conflicting-group-option")
)
)
|
repeatable(
required("--begin-group-b")
&
(
option("--conflicting-group-option")
)
)
When trying to parse any of --begin-group-a --begin-group-a
, --begin-group-a --conflicting-group-option --begin-group-a
or any other input that would require more than one iteration, the second and following instances of --begin-group-a
are always rejected as [blocked]
.
We can simplify this down to the following and the bug remains reproducible:
repeatable(
required("--begin-group-a")
&
option("--conflicting-group-option")
)
Simplified even further:
repeatable(
required("--begin-group-a").blocking(true)
,
option("--conflicting-group-option")
)
Reducing it to a single element within the repeatable group does not trigger the bug:
repeatable(
group(
required("--begin-group-a").blocking(true)
).scoped(true)
)
--begin-group-a --begin-group-a
is accepted.
Trying to avoid blocking arguments looks like it would work, but actually doesn't:
repeatable(
required("--begin-group-a")
,
(
option("--conflicting-group-option")
)
)
|
repeatable(
required("--begin-group-b")
,
(
option("--conflicting-group-option")
)
)
--group-option-a --conflicting-group-option --begin-group-a
gives an unavoidable [conflict]
on --conflicting-group-option
.
Metadata
Metadata
Assignees
Labels
No labels