Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plug-ins are no longer displayed with vpype --help #432

Closed
abey79 opened this issue Mar 28, 2022 · 0 comments · Fixed by #444
Closed

Plug-ins are no longer displayed with vpype --help #432

abey79 opened this issue Mar 28, 2022 · 0 comments · Fixed by #444
Labels
bug Something isn't working
Milestone

Comments

@abey79
Copy link
Owner

abey79 commented Mar 28, 2022

No description provided.

@abey79 abey79 added the bug Something isn't working label Mar 28, 2022
@abey79 abey79 added this to the 1.10.0 milestone Mar 28, 2022
abey79 added a commit that referenced this issue Apr 1, 2022
When importing plug-ins in the style of `click-plugin` (command decorator, so plug-ins are loaded during the loading of the top-level command itself), plug-ins may not import from `vpype_cli` (since it isn't fully loaded). To address that, since 1.9, loading plug-ins is deferred to when `cli` is actually executed. As a result, the Click's default behaviour for handling `--help` (i.e. print and exit *before* even executing `cli`) is unable to list the plug-ins. This commit addresses this by manually handling the top-level `--help` parameter (*after* plug-ins are loaded).

Fixes #432
abey79 added a commit that referenced this issue Apr 2, 2022
When importing plug-ins in the style of `click-plugin` (command decorator, so plug-ins are loaded during the loading of the top-level command itself), plug-ins may not import from `vpype_cli` (since it isn't fully loaded). To address that, since 1.9, loading plug-ins is deferred to when `cli` is actually executed. As a result, the Click's default behaviour for handling `--help` (i.e. print and exit *before* even executing `cli`) is unable to list the plug-ins. This commit addresses this by manually handling the top-level `--help` parameter (*after* plug-ins are loaded).

Also fixed multiple plug-in loading when using `vpype_cli.execute()` multiple times

Fixes #432
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant