ArgumentParser 1.3.0
Changes
-
The
@Option
,@Argument
,@Flag
, and@OptionGroup
property wrappers now conditionally conform toSendable
when the wrapper'sValue
type conforms. With this change, you can markParsableCommand
types asSendable
when you want to be able to pass a parsed command across concurrent contexts. (#582)Migration: Users that aren't ready to resolve sendability warnings can add the
@preconcurrency
attribute toimport ArgumentParser
statements. -
To support migration to
Sendable
annotation, the minimum Swift version forswift-argument-parser
has been increased to Swift 5.7. Users of older Swift versions will be able to continue using version 1.2.3 of the library. (#582)
Additions
- Help screens now include possible options for
ExpressibleByArgument
types with non emptyallValueStrings
. Types also conforming toCaseIterable
do not need to manually implementallValueStrings
, instead it is derived fromallCases
. (#594)
Fixes
- The titles for nested option groups are preserved when embedded into commands without specifying a new title. (#592)
- When wrapping help and error messages, the library now uses the
COLUMNS
environment variable when set, instead of immediately falling back to 80 columns. (#596) - Bash completion scripts now respect the extensions given in a
.file(...)
completion kind. (#590) - Bash completion scripts now properly escape command names that include hyphens. (#573)
- Documentation improvements. (#572, #565, #602)
The 1.2.3 release includes contributions from @Alkenso, @compnerd, @gwynne,
@kennyyork, @natecook1000, @rauhul, @robertmryan, and @vlm. Thank you!