You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the user specifies -a -b, the application expects to be able to inspect the group and see both the a and the b field set to true. For exclusive groups this won't happen. While parsing, when the second option of an exclusive group is matched, a new instance of the group is created to prevent having mutually exclusive options in the same group. So, in the above example, the group field would be reassigned a new instance of MyGroup, and only the b field in that instance would be true.
The fix is to automatically set groups to exclusive = false when the group is defined as non-validating.
The text was updated successfully, but these errors were encountered:
(Related to #810)
If an Argument Group is defined as
@ArgGroup(validate = false)
, it should automatically be set toexclusive = false
.This prevents issues where a new group instance is created for each option in the group. This is not necessary for non-validating groups.
For example:
When the user specifies
-a -b
, the application expects to be able to inspect thegroup
and see both thea
and theb
field set totrue
. For exclusive groups this won't happen. While parsing, when the second option of an exclusive group is matched, a new instance of the group is created to prevent having mutually exclusive options in the same group. So, in the above example, thegroup
field would be reassigned a new instance ofMyGroup
, and only theb
field in that instance would betrue
.The fix is to automatically set groups to
exclusive = false
when the group is defined as non-validating.The text was updated successfully, but these errors were encountered: