asdf-vm/asdf

bug: `asdf latest <plugin>` and `asdf latest --all` are sometimes inconsistent

cj81499 opened this issue · 0 comments

Describe the Bug

Using asdf v0.13.1 (latest at time of writing), asdf latest <plugin> and asdf latest --all are sometimes inconsistent.

Steps to Reproduce

# install asdf-bazel-buildtools plugin
# use ssh
$ asdf plugin add git@github.com:cj81499/asdf-bazel-buildtools.git
# or use https
$ asdf plugin add https://github.com/cj81499/asdf-bazel-buildtools.git

$ asdf latest bazel-buildtools  
6.1.1

$ asdf latest --all
...
bazel-buildtools        v6.4.0  installed
...

# observe inconsistency

Expected Behaviour

Both commands should report the latest version of bazel-buildtools (v6.4.0 at time of writing)

Actual Behaviour

asdf latest --all correctly reports the latest version (v6.4.0)

asdf latest bazel-buildtools incorrectly reports an old version (6.1.1)

I believe this is due to asdf latest --all and asdf latest <plugin> using a different default filter. I intend to open a PR to fix shortly.

See cj81499/asdf-bazel-buildtools#6

Environment

OS:
Linux cjacobson-dev1 5.4.0-131-generic #147-Ubuntu SMP Fri Oct 14 17:07:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
zsh 5.8 (x86_64-ubuntu-linux-gnu)

BASH VERSION:
5.0.17(1)-release

ASDF VERSION:
v0.13.1-0586b37

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/home/cjacobson/.asdf
ASDF_DIR=/home/cjacobson/.asdf
ASDF_CONFIG_FILE=/home/cjacobson/.asdfrc

ASDF INSTALLED PLUGINS:
...
bazel-buildtools             git@github.com:cj81499/asdf-bazel-buildtools.git main ce6b4b1
...

asdf plugins affected (if relevant)

https://github.com/cj81499/asdf-bazel-buildtools