Is your feature request related to a problem? Please describe:
I have encountered multiple installation failures due to an outdated plugin, with no information as to why.
Describe the solution you'd like:
I'd like for a plugin update check to be performed when running asdf commands which utilize the plugin, and to be notified if there is an update available for the plugin. For example: asdf list all [plugin], asdf install [plugin] [version], etc.
This could be implemented with a TTL cache so that there aren't repeated network requests performed within a given window of time.
If it is decided that this feature request is ultimately the responsibility of each plugin, then this is a request to provide a framework for plugin authors to easily implement the feature.
Describe similar asdf features and why they are not sufficient:
There are no similar features to compare.
Describe workarounds you've considered:
Manually check if there is a plugin update and install it.
Additional context
https://github.com/asdf-community/asdf-deno/issues/7
I like this feature request.
Since the plugins are git repos, I believe this logic could easily live in the core. TTL cache is a great idea.
We could use git ls-remote to check the repo head or tags to see if new versions exist without having to perform a checkout. (I think we should have another discussion elsewhere around encouraging versioning of plugins via git tags)
I think mimicking the npm style of notification would be ideal here. It's loud, clean and familiar:
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ New patch version of npm available! 6.13.4 โ 6.13.7 โ
โ Changelog: https://github.com/npm/cli/releases/tag/v6.13.7 โ
โ Run npm install -g npm to update! โ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Edit: or Flutter
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ A new version of Flutter is available! โ
โ โ
โ To update to the latest version, run "flutter upgrade". โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
For reference: asdf plugin update code
I suppose asdf should also report updates about itself ๐
Yes it should, and I imagine the code for this would be the same just with the repo URL being targeted as the only difference
I'm confident this will be the same code so renaming this Issue to cover the core asdf tool as well.
Thanks for raising this! I use "brew" to have asdf core updated, but missed some native (i.e. w/o crontab...) solution for plugins - a notification (specifically in the npm style above) would still serve as great help, e.g. in context of https://github.com/halcyon/asdf-java/issues/12#issuecomment-632087820
Yes, there's currently no solution for auto-updating the plugins. I have some ideas around this aside from just the message.
I have some ideas around this aside from just the message.
@jthegedus I know it's been a while since this topic had activity, so you might need to reference some notes or jog your memory, but do you have any details to share?
@jsejcksn Those ideas were more around how we handle sourcing plugins in general and plugin versioning.
For reference, here's the Issue requesting plugin versions https://github.com/asdf-vm/asdf/issues/166
I'll start work on this soon(TM)
Since we rely on master branches for plugins (atleast from what I remember), informing the user about plugin update would mean that:
I agree with @jthegedus.
asdf infoSince we rely on master branches for plugins (atleast from what I remember)
On asdf plugin add <name> the default branch of the remote is used. It's only on asdf plugin update [<name>|--all] that master is assumed, but #800 resolves that issue.
Updates to tags is on my radar, with the general idea to be if a tag ref is in use for a plugin, only update to newer tag refs.
we wouldn't want to slow down running any local command by making a remote request
I was thinking a similar solution to ZSH whereby it is on initial asdf load in the shell that we check the core and all plugins the user has installed. asdf info is another idea whereby we should probably print the plugin ref as well :thinking:
Most helpful comment
I suppose
asdfshould also report updates about itself ๐