Skip to content

title argument passed to nested @OptionGroup has no effect #558

@MaxDesiatov

Description

@MaxDesiatov

@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
  • I've searched for existing GitHub issues

Steps to Reproduce

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions