Releases: apple/swift-argument-parser
ArgumentParser 1.8.2
Fixes
- Fixes
fishcompletion scripts for certain flag and option names. (#911) - Resolves a build warning by making an implicit
Int32cast explicit on Windows. (#913)
The 1.8.2 release includes contributions from @compnerd and @rgoldberg. Thank you!
ArgumentParser 1.8.1
Fixes
- Reverts a source compatibility regression in the 1.8.0 release, where existing calls to
ParsableCommand.parse()and.parseAsRoot()were pre-empted by newasyncversions. The new asynchronous entry points are now namedasyncParse()andasyncParseAsRoot(), respectively. Clients that have already updated their code with theawaitkeyword can resolve the new warning by calling the new APIs or by removing the keyword. (#908) - Resolves an issue with the
generate-manualplugin that selected the wrong destination for the generated manual. (#910)
ArgumentParser 1.8.0
Additions
NameSpecificationand its elements now conform toExpressibleByStringLiteral, allowing simplified option and flag name declarations. For example,@.customLong("hex-output"), .customShort("x")can now be written as"--hex-output -x". (#745)- New
@Optioninitializers accept adefaultAsFlag:parameter, creating options that work both as a bare flag (--format) and as an option with a value (--format json). (#830) - Custom completion closures for
AsyncParsableCommandtypes now supportasync/await. (#855)
Changes
- The minimum Swift version for
swift-argument-parserhas been updated to Swift 6. Users of older Swift versions can continue using version 1.7.1 of the library. (#882)
Fixes
- Command aliases now appear in generated man-pages for both single-page and multi-page output. (#891)
- Declaring
@Flag var x: Bool?without aninversion:parameter now produces a useful diagnostic message. (#892)
The 1.8.0 release includes contributions from @bkhouri, @natecook1000, @qflen, @rauhul, and @rgoldberg. Thank you!
ArgumentParser 1.7.1
Changes
- Adds detailed documentation for providing descriptions of enum values. (#825)
- Adds
aliasesto the dump-help output. (#813) - Improves zsh completions; prevents bash completion cleanup commands from being appended to shell history. (#864, #859)
- Eliminates deprecation warnings in
Examples/math. (#879)
Fixes
- Fixes build issues in Swift 5.7-5.9. (#874, #875)
- Fixes
--helpoutput for nested subcommands with default subcommands. (#866) - Prevents
@OptionGrouptype names from appearing in help usage strings. (#873) - Fixes handling of visibility with nested option groups. (#838)
- Updates GitHub Actions workflows and streamlines the required checks. (#839, #843, #844, #853, #856, #857, #876, #877)
The 1.7.0 release includes contributions from @bkhouri, @bob-wilson, @jglogan,
@kphrx, @louisunlimited, @natecook1000, @rauhul, @rgoldberg, @salmanmkc,
@stackotter, and @william-laverty. Thank you!
ArgumentParser 1.7.0
Additions
- Access the state of an ancestor command using the new
@ParentCommandproperty wrapper. (#802)
Fixes
- Corrects the help display for an case iterable option value type. (#821)
- Fixes ArgumentParser build failure for WASI (WebAssembly System Interface). (#794)
- Updates help text for readability in Repeat example and README. (#787)
- Provides an ambiguity breaker for some
ExpressibleByArgumenttypes. (#841) - Shell completion script fixes. (#801, #808, #811)
Changes
docc: Updates the output to present the string representation of command arguments as a wrapped text block. (#791)- Uses Foundation Essentials when possible to reduce binary size on non-Darwin platforms. (#804)
- CMake: Suppress needlessly alarming messages. (#628)
The 1.7.0 release includes contributions from @bkhouri, @cmcgee1024, @dabrahams, @heckj, @incertum, @kkebo, @Konstantin-Krokhin, @natecook1000, @rauhul, @rgoldberg, and @tshortli. Thank you!
ArgumentParser 1.6.2
Fixes
- Fixes an ArgumentParser build failure for WASI. (#794)
ArgumentParser 1.6.1
Fixes
- Resolves a source break for clients that have conditional conformances to
ExpressibleByArgumentorParsableArguments. (#792)
ArgumentParser 1.6.0
Additions
- Options with
CaseIterabletypes can now provide help descriptions on a per-value basis. (#647) - New API for accessing the shell and shell version while generating completions. (#680, #690)
- The
generate-docc-referenceplugin generates a DocC reference folder for your CLI tool. (#694, #754, #773)
Changes
- Testing and continuous integration improvements, including migrating to GitHub workflows. (#692, #693, #696, #698, #699, #700, #701, #708, #711, #718, #716, #714, #712, #732, #730, #746, #747, #760)
- The associated closure for
CompletionKind.customnow takes three parameters: the array of shell words currently in use for the completion request, the offset in that array for the word that completions are being requested for, and the prefix of that word that precedes the cursor. In addition, the associated closure can beasync. The single-argument closure version ofCompletionKind.customis deprecated with this release. (#763, #770, #782) ParsableArgumentsandExpressibleByArgumentnow conform toSendableMetatypewhen builing with a minimum Swift 6.2 compiler. (#789)
Fixes
- Significant fixes and improvements across the entire completion script generation system, too numerous to mention here. Please note: numerous longstanding issues still remain in the completion scripts (mainly involving quoting/escaping); they will be fixed over time. A special thanks to @rgoldberg for the investment in completion script quality! (#727, #735, #738, #740, #762, #763, #775, #770, #777, #767)
- Improvements to
generate-manualplugin. (#663, #667) - Error messaging when a user provides a single-dash option is now improved, along with other error reporting improvements. (#728, #744)
- Implementation improvements and fixes for both older and newer versions of Swift. (#676, #707, #705, #720, #666, #724, #731, #766, #685, #729, #736, #741)
- Better capturing of tool configuration in
ToolInfo. (#669, #697) - Documentation improvements. (#657, #678, #743)
The 1.6.0 release includes contributions from @bripeticca, @cg-soft, @compnerd, @dshan4585, @heckj, @natecook1000, @rauhul, @rgoldberg, and @Steelskin. Thank you!
ArgumentParser 1.5.1
ArgumentParser 1.5.0
Additions
- Subcommands can now be grouped into sections, to enable a better help display for commands with many subcommands. (#644)
- Improved unofficial support for Android and riscv64 platforms. (#649, #651)
Fixes
- Command-line completion scripts correctly complete for arguments that are included via option group. (#648)
- Several warnings when compiling with strict concurrency enabled, or in Swift 6 language mode, are now silenced. (#650)
The 1.5.0 release includes contributions from @CraigSiemens, @DougGregor, @finagolfin, @futurejones, and @natecook1000. Thank you!