mirror of
https://github.com/apple/swift-argument-parser.git
synced 2026-06-06 20:18:23 +00:00
Adds a new `AsyncParsableCommand` protocol, which provides a
`static func main() async` entry point and can call through to the root
command's or a subcommand's asynchronous `run()` method. For this
asynchronous execution, the root command must conform to `AsyncParsableCommand`,
but its subcommands can be a mix of asynchronous and synchronous commands.
Due to an issue in Swift 5.5, you can only use `@main` on an
`AsyncParsableCommand` root command starting in Swift 5.6.
This change also includes a workaround for clients that are using Swift 5.5.
Declare a separate type that conforms to `AsyncMainProtocol` and add the `@main`
attribute to that type.
```
@main enum Main: AsyncMain {
typealias Command = <#command#>
}
```
21 lines
190 B
Plaintext
21 lines
190 B
Plaintext
absinthe
|
|
actuary
|
|
adenoid
|
|
affidavit
|
|
affluent
|
|
agnostic
|
|
agoraphobia
|
|
albatross
|
|
algebra
|
|
alkaline
|
|
allocution
|
|
ampule
|
|
antimony
|
|
argument
|
|
artesian
|
|
askance
|
|
asterisk
|
|
astonishment
|
|
asynchronous
|
|
axiomatic
|