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

Allow re-installing old/broken tool installations following a plugin update, e.g. via post-plugin-update hook #859

Open
nirvana-msu opened this issue Feb 3, 2021 · 0 comments

Comments

@nirvana-msu
Copy link

Is your feature request related to a problem? Please describe.
Sometimes you make updates to your plugin that fix something that was broken in the previous installs. In these cases, it would be great to have a way to force re-installation of the old (broken) installs.

Describe the solution you'd like
One way to achieve that would be by adding a post-plugin-update hook - so that once plugin is updated, it can trigger re-installation of old (broken) installs. One tricky part would be to ensure re-install is only triggered when plugin is updated to a certain revision - e.g. next update may not require re-install. It would have been easy if plugins themselves were versioned, but I suppose it could also be done if we know which git-ref we're upgrading from.

Alternatively, this could be addressed by allowing a plugin to "declare" that a change breaks certain install versions - and then asdf itself could take care of re-installing those versions (if installed).

The hook is more general so can probably cover some other use-cases not described here.

Describe similar asdf features and why they are not sufficient
There are already similar hooks post-plugin-add and post-plugin-remove, but in this case an action needs to be taken on plugin update.

Describe workarounds you've considered
At the moment I have to warn users that they need to manually re-install affected tool versions after updating plugin.

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

No branches or pull requests

2 participants