arcanis/clipanion

Feature request: Support async `validator`

Closed this issue · 1 comments

Ayc0 commented

I use clipanion in a huge codebase where we have a lot of CLIs defined in a few folders.
To register all of them, we go through all the files specific CLIs folders and require() all of them to have all CLIs available in 1 CLI

But to avoid initial CPU overhead, we limited the amount of code that is run at require time, to have them all at run time.

One of our blockers are validator are they can only be synchronous functions, but we may need to import() variables from other files, and thus need to be async.

Can we allow validator in clipanion to support async functions too to support this use-case?

Ayc0 commented

Actually I already opened #142 in the past, so I'll close this one as it's duplicated 😬

Sorry about that