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

Extension command plugins are indistinguishable from vm based plugins #641

Closed
andrewthauer opened this issue Jan 26, 2020 · 0 comments
Closed
Assignees

Comments

@andrewthauer
Copy link
Contributor

andrewthauer commented Jan 26, 2020

Extension commands are a great addition to asdf 🎉. However, in their current form there are some potentially undesirable side effects and behaviours.

For example, let's assume we want to introduce a new extension command named alias as a plugin called asdf-alias. We install the plugin as alias and it contains a bin/command executable.

If we run asdf current, the plugin named alias shows up on the list of versions. While this doesn't cause any issues per say, it is somewhat misleading as versions are irrelevant. If you had a bunch of these types of plugins installed it could also be a bit noisy.

To avoid this issue (and other possible conflicts), I propose using a standard naming convention for extension command only plugins. For example, if a plugins was named [name]-command (e.g. ~/.asdf/plugins/alias-command), then it would be treated differently from traditional plugins:

  • asdf would scan for any plugins with a suffix -command and include them as plugins, but register them without the the -command suffix.
  • The command asdf current would not list the command only plugins.
    • For example, I would not see alias No version set for alias;
  • Optionally, various commands like install, uninstall, reshim, list, etc. would ignore any command based plugins.

NOTE: This convention would only apply if the plugins does not manage versions. Plugins that manage versions but also have extension commands would not use the -command suffix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants