Open scalp42 opened 2 years ago
Same for java
and possibly all other plugins that have multiple distributions/variants.
The current implementation of --all
expects a single (latest) version and simply shows the last entry from the asdf list all
command (see command-latest.bash#L61).
Hello, I wonder if there was already a solution to this annoying issue and came up with some ideas.
$ asdf current java
java openjdk-21.0.2 /home/flops/.tool-versions
$ asdf latest java
No compatible versions available (java [0-9])
$ asdf latest --all
java zulu-musl-22.30.13 missing
One can immediately figure some issues:
latest java
should not reply with no version, but should report the latest openjdk 21 versionlatest --all
should not reply with the latest of all java versionsOnce the difference between the 2 is fixed, I have several proposal for managing variants and versions.
This does introduce no breaking change, which is I guess very very important.
openjdk-21
issueThe idea is to ask java and other plugins developers to add a new variants file containing a list if regex if all their applications.
For example, for the java plugin, this file could contain a line with openjdk-21.
and another with zulu-musl-22.
, etc. The idea is to list all "modules" provided by the plugin.
This way, asdf can identify I have installed openjdk-21 (and not 20 neither 22) and should list updates for this one only. And of course, if I installed both zulu and openjdk, then propose both updates :)
We could then get something like this, if I installed both openjdk 21 and 22:
$ asdf latest --all
java openjdk-21.0.3 missing
java openjdk-22.0.1 missing
I was thinking that it could be interesting to be able to allow updating 1.x versions without updating to 2.x if I want to stay to 1.x.
There is no "good" way for doing this. I was first thinking that may adding a new file for partial versions and so on, but it looks like to be too overkill. Then I considered an easier solution, just propose all matching updates and let the user choose what he wants.
The idea is then to have something like this:
$ asdf latest xxx
xxx 2.5.1 missing (latest)
xxx 1.8.0 missing (latest 1.* based on installed 1.7.1)
xxx 1.7.5 missing (latest 1.7.* based on installed 1.7.1)
Here, as I have installed version 1.7.1, update lists the latest "1.7.", "1." and "*".
There should be a way to prevent updating to a pre-release. One idea is to mark them in the versions list provided by the plugins, maybe with a "*" or anything alike. Maybe it is already the case?
This way, it is still possible to install a beta version, but not to update to it automatically.
The only requirements for thes ideas to work are:
These are just ideas that seem to be reasonable enough (at least to me) to add more value to asdf, especially as it does not introduce any breaking change ;)
Of course, there are probably a lot of work to do on asdf side to implement such features, and then have the plugins add the necessary files to provide the variants prefixes.
Let's continue the discussion here!
Describe the Bug
Hi folks,
I've noticed a bug where
asdf latest --all
report the wrong runtimes version (added in https://github.com/asdf-vm/asdf/pull/1096 and fixed in https://github.com/asdf-vm/asdf/pull/1118).Here's example:
If I try to run asdf latest individually, the right runtime is picked:
asdf version:
v0.9.0-7493f40
Thanks in advance for looking into it and thank you for asdf.
Steps to Reproduce
asdf plugin add python
&asdf plugin add ruby
asdf latest --all
Expected Behaviour
It should have listed Python
3.10.2
and Ruby3.0.2
.Actual Behaviour
It listed:
Environment
asdf plugins affected (if relevant)
python & ruby?