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

asdf list could return the latest version available vs what's installed locally #1036

Closed
scalp42 opened this issue Sep 2, 2021 · 6 comments · Fixed by #1096
Closed

asdf list could return the latest version available vs what's installed locally #1036

scalp42 opened this issue Sep 2, 2021 · 6 comments · Fixed by #1096

Comments

@scalp42
Copy link

scalp42 commented Sep 2, 2021

Is your feature request related to a problem? Please describe

While setting versions in .tool-versions is awesome, it'd be great to have a way to know when a new version is available.

Describe the proposed solution

When typing asdf list, it'd print the latest version available:

$> asdf list

ruby (latest is 3.0.2)
  2.7.3
  3.0.1
terraform (latest is 1.0.5)
  0.14.4
  0.15.5
  1.0.4

Describe similar asdf features and why they are not sufficient

asdf latest X work but it becomes cumbersome when the list starts growing.

Describe other workarounds you've considered

Just scripting using asdf list, asdf info and asdf latest

PS: thank you very much and no matter what, asdf is awesome!

@jthegedus
Copy link
Contributor

Hmm, this would add a call to asdf latest <plugin> per plugin in the list, slowing down the currently local-only command. We want to avoid network calls if we can.

Perhaps if we capture this under a flag asdf list --show-latest or an .asdfrc config value it would preserve existing local-only behaviour.

@scalp42
Copy link
Author

scalp42 commented Sep 3, 2021

Yes, totally agree re keeping it local.

@jthegedus
Copy link
Contributor

Just thinking out loud, perhaps a command asdf latest --all which calls asdf latest <plugin> for each plugin you have installed and a marker for if you have that latest version installed?

$> asdf list

ruby
  2.7.3
  3.0.1
terraform
  0.14.4
  0.15.5
  1.0.4

$> asdf latest --all

ruby      3.0.1    installed
terraform 1.0.5    missing

Would this grant you the information you are after?

@scalp42
Copy link
Author

scalp42 commented Sep 3, 2021

yes, it'd be perfect (pretty much what the scripting side does) 👌

@threkk
Copy link
Contributor

threkk commented Oct 10, 2021

I might have some time at the end of the month to work on this. Please, let me know if anyone is interested in working on this before or I will pick it up then :)

threkk added a commit to threkk/asdf that referenced this issue Nov 16, 2021
As discussed in asdf-vm#1036, this patch adds a `--all` flag to the latest
command which will show the list of plugins, their latest version and if
this one is installed or not.

This patch basically reuses the logic used in the list command and the
latest command. The main different is the removal of the query
paramenter as different plugins might need different queries.
@threkk
Copy link
Contributor

threkk commented Nov 16, 2021

Sorry for the delay! I wrote a patch for this issue which can be found here #1096

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

Successfully merging a pull request may close this issue.

3 participants