Swift Argument Parser v0.5.0 Release Notes

Release Date: 2021-09-02 // 17 days ago
  • โž• Additions

    • When a user doesn't provide a required argument, the error message now includes that argument's help text. ([#324])
    • ๐Ÿ“œ Command-line tools built with ArgumentParser now include an experimental flag to dump command/argument/help information as JSON: --experimental-dump-help. ([#310])

    ๐Ÿ”„ Changes

    • All public enumerations are now structs with static properties, to make compatibility with future additions simpler.

    ๐Ÿ›  Fixes

    • ๐Ÿ“œ Array properties defined as @Option with the .upToNextOption parsing strategy now include all provided values. ([#304]) In the example below, all four values are now included in the resulting array, where only the last two were included in previous releases:

      struct Example: ParsableCommand {
          @Option(parsing: .upToNextOption)
          var option: [String]
      $ example --option one two --option three four
    • When a command defines an array property as an @Argument with the .unconditionalRemaining parsing strategy, option and flag parsing now stops at the first positional argument or unrecognized flag. ([#333])

    • Completion scripts correctly use customized help flags. ([#308])

    • ๐Ÿ›  Fixes errors with bash custom completion arguments and the executable path. ([#320], [#323])

    • ๐Ÿ›  Fixes the behavior when a user specifies both the help subcommand and a help flag. ([#309])

    • A variety of internal improvements. ([#315], [#316], [#321], [#341])

    ๐Ÿš€ The 0.5.0 release includes contributions from [atierian], [compnerd], [dirtyhabits97], [Frizlab], [KS1019], [natecook1000], and [rauhul]. Thank you!

Previous changes from v0.4.4

  • ๐Ÿ›  Fixes

    • โ†ช Includes a workaround for a runtime crash with certain OptionGroup configurations when a command is compiled in release mode.