Support async custom completion functions for AsyncParsableCommand via async/await#855
Support async custom completion functions for AsyncParsableCommand via async/await#855rgoldberg wants to merge 3 commits intoapple:mainfrom
AsyncParsableCommand via async/await#855Conversation
b258097 to
5abed1e
Compare
|
Are there any changes that you would like for this PR? |
This should be detected at build time, if possible. There are a series of validators in the |
|
Thanks. I'll look into Validators soon, then add the check. |
613d0b2 to
a0a6d77
Compare
|
@natecook1000 I've added I've rebased on current main. Is there any way in the longterm to change SAP to run some or all of the If possible, I'll log an issue. |
a0a6d77 to
ed816dd
Compare
de32339 to
735d19c
Compare
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
…a async/await. Signed-off-by: Ross Goldberg <484615+rgoldberg@users.noreply.github.com>
735d19c to
858faf7
Compare
DispatchSemaphore, so more modern standards compliant & will work for platforms that do not haveDispatchSemaphore.DispatchSemaphoreimplementation hangs when any async custom completions run if the root command is a syncParsableCommand; async custom completions do not hang because ofDispatchSemaphoreif the root command is anAsyncParsableCommand, regardless if the command containing the property for the completing argument is a syncParsableCommandor anAsyncParsableCommand.ParsableCommand.ParsableArguments#_errorLabelDocC (unrelated, but just noticed it should be improved).A few potential issues with / questions about what you want from this PR:
AsyncParsableCommandroot commands.ParsableCommand.ParsableCommandtoAsyncParsableCommand, since Swift Concurrency must be available, since the code is trying to use an async function for completion.ParsableCommand, aParserError.invalidStateis thrown during runtime when completion candidates are requested from an async custom completion function.Checklist