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
I'm using clipanion in a repositories with a lot of CLIs. To avoid 1 CLI to slow down all others, we follow the guidelines here https://mael.dev/clipanion/docs/tips#lazy-evaluation: we moved all our top level imports within the Command classes (except for node builtins and for clipanion).
But when we have to use enums that come from other files for the validator, we have to use a top level import, something like:
Hello 👋
I'm using clipanion in a repositories with a lot of CLIs. To avoid 1 CLI to slow down all others, we follow the guidelines here https://mael.dev/clipanion/docs/tips#lazy-evaluation: we moved all our top level imports within the
Command
classes (except for node builtins and forclipanion
).But when we have to use enums that come from other files for the
validator
, we have to use a top level import, something like:But now, we don't have any control anymore on
other-file
, and this file could block the main thread without realizing it on load.Could we introduce the ability for clipanion to support async functions in
validator
?This would allow to re-write this code this way:
Which is also compliant with the recommendation in the doc for lazy evaluations.
If this is accepted, I can try writing a PR for it
The text was updated successfully, but these errors were encountered: