You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve failure message for backdeployed AsyncParsableCommand (#547)
When an executable with asynchronous commands is backdeployed,
the compiler chooses the synchronous `main()` unless a minimum
availability target is provided for the root command type. This
changes the error message provided when the incorrect `main()`
function is called to direct the tool's author to a correct
solution.
The asynchronous command `\(subCommand)` is declared as a subcommand of the synchronous root command `\(rootCommand)`.
234
+
235
+
With this configuration, your asynchronous `run()` method will not be called. To fix this issue, change `\(rootCommand)`'s `ParsableCommand` conformance to `AsyncParsableCommand`.
The asynchronous root command `\(rootCommand)` needs an availability annotation in order to be executed asynchronously. To fix this issue, add the following availability attribute to your `\(rootCommand)` declaration or set the minimum platform in your "Package.swift" file.
0 commit comments