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
@OptionGroup behaves in an unexpected way with nested groups when title: argument value is specified.
ArgumentParser version: 1.2.2 Swift version:
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0
Checklist
If possible, I've reproduced the issue using the main branch of this package
Create a type that has properties using @OptionGroup property wrapper with title: argument passed. Uses this type then as @OptionGroup itself. This top level may specify or not specify its own title: argument, this doesn't make a difference on the observed outcome.
Expected behavior
Nested @OptionGroups have their title: values displayed and options grouped by these titles in help output.
Actual behavior
Nested @OptionGroups don't have their title: values displayed and options grouped by these titles in help output. All of the options are displayed within the top-level group, title: values on nested groups have no effect whatsoever.
The text was updated successfully, but these errors were encountered:
Great spot, @MaxDesiatov — it would be great if these could preserve their titles when nested. What do you think the behavior should be if the "parent" option group also includes a title? That is, what should the help look like in this case?
@OptionGroup
behaves in an unexpected way with nested groups whentitle:
argument value is specified.ArgumentParser version: 1.2.2
Swift version:
swift-driver version: 1.62.15 Apple Swift version 5.7.2 (swiftlang-5.7.2.135.5 clang-1400.0.29.51)
Target: arm64-apple-macosx13.0
Checklist
main
branch of this packageSteps to Reproduce
Create a type that has properties using
@OptionGroup
property wrapper withtitle:
argument passed. Uses this type then as@OptionGroup
itself. This top level may specify or not specify its owntitle:
argument, this doesn't make a difference on the observed outcome.Expected behavior
Nested
@OptionGroup
s have theirtitle:
values displayed and options grouped by these titles in help output.Actual behavior
Nested
@OptionGroup
s don't have theirtitle:
values displayed and options grouped by these titles in help output. All of the options are displayed within the top-level group,title:
values on nested groups have no effect whatsoever.The text was updated successfully, but these errors were encountered: