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

bug: /bin/asdf is version 0.15.XXX #1859

Open
agreedSkiing opened this issue Jan 30, 2025 · 9 comments
Open

bug: /bin/asdf is version 0.15.XXX #1859

agreedSkiing opened this issue Jan 30, 2025 · 9 comments
Labels

Comments

@agreedSkiing
Copy link

Describe the Bug

The binary supplied as of today 15:44 UTC is not version 16

~/.asdf$ bash ./bin/asdf --version | tee debug.log
----------

NOTICE:

You have tried to upgrade to asdf 0.16.0 or newer. Versions 0.16.0 is a
complete rewrite of asdf in Go. This text is being printed by the older
Bash implementation. If you are seeing this you have not migrated to
asdf 0.16.0. Please follow the instructions on the upgrade guide to
migrate to the new version.

Aside from this notice, this older Bash implementation works as it did
in asdf version 0.15.0 and older.

Migration guide: https://asdf-vm.com/guide/upgrading-to-v0-16
asdf website: https://asdf-vm.com
Source code: https://github.com/asdf-vm/asdf


v0.15.0-fe00f79

Steps to Reproduce

  1. Git clone master
  2. Git checkout fe00f79
  3. bash ./bin/asdf --version

Expected Behaviour

Print version 16 with all the new functions

Actual Behaviour

Print the 0.15 version

Environment

~/.asdf$ bash ./bin/asdf info
----------

NOTICE:

You have tried to upgrade to asdf 0.16.0 or newer. Versions 0.16.0 is a
complete rewrite of asdf in Go. This text is being printed by the older
Bash implementation. If you are seeing this you have not migrated to
asdf 0.16.0. Please follow the instructions on the upgrade guide to
migrate to the new version.

Aside from this notice, this older Bash implementation works as it did
in asdf version 0.15.0 and older.

Migration guide: https://asdf-vm.com/guide/upgrading-to-v0-16
asdf website: https://asdf-vm.com
Source code: https://github.com/asdf-vm/asdf


OS:
Linux DI-001000155089 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

SHELL:
GNU bash, version 5.2.21(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

BASH VERSION:
5.2.21(1)-release

ASDF VERSION:
v0.15.0-fe00f79

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

ASDF INSTALLED PLUGINS:
golang                       https://github.com/asdf-community/asdf-golang.git master e2527a3
java                         https://github.com/halcyon/asdf-java.git master 7c7ce22
maven                        https://github.com/halcyon/asdf-maven.git master 583612b
neovim                       https://github.com/richin13/asdf-neovim.git master ff05a09
nodejs                       https://github.com/asdf-vm/asdf-nodejs.git master 93bd217

asdf plugins affected (if relevant)

No response

@agreedSkiing agreedSkiing changed the title bug: /bin/asdf is bug: /bin/asdf is version 0.15.XXX Jan 30, 2025
@Stratus3D
Copy link
Member

You are not using the 0.16.0 binary. As the notice that you posted states:

If you are seeing this you have not migrated to asdf 0.16.0.

You are still using the Bash version, which is 0.15.0. If you want to upgrade 0.16.0 you'll need to follow the upgrade guide - https://asdf-vm.com/guide/upgrading-to-v0-16. Checking out the 0.16.0 tag isn't enough as the new version is written in Go, and the new binary would have to be compiled and placed on your path.

@iwpnd
Copy link

iwpnd commented Jan 30, 2025

Hi @Stratus3D, how could I address this with the asdf github action? 🤔 Looks like the action is not updated yet. What is a branch that I can use in the action, to fall back to the old version?

@Stratus3D
Copy link
Member

Hi @iwpnd , I'm not an expert on the GitHub action, but it looks like there is an asdf_branch option - https://github.com/asdf-vm/actions/blob/1bf052e01b498bba4f98e1bbb5c609bc212cf463/plugins-add/action.yml#L8. That should also accept a Git tag as well as branch, so I'd try setting it to v0.15.0.

@Stratus3D
Copy link
Member

It's a little odd that that input defaults to master. I'd think for GitHub actions we'd want to default to a stable version and not the latest commit.

@agreedSkiing
Copy link
Author

agreedSkiing commented Jan 30, 2025 via email

@jacekkujawski
Copy link

jacekkujawski commented Jan 31, 2025

Isn't the issue caused by lack of change in this file
https://github.com/asdf-vm/asdf/blob/master/version.txt#L1

Which is then used by Makefile during building in "tagging" a version.
https://github.com/asdf-vm/asdf/blob/master/Makefile#L4-L9

Isn't it building version v0.16.0 but calling it v0.15.0 and then spam the warning message about upgrading to 0.16.0, because the build is in fact for v0.16.0 but its release is v0.15.0

@nizarakbarm
Copy link

This is definitely a bug. If i follow the step of Build from source, i will get this when executing make:

make
go build -ldflags='-s -X main.version=v0.15.0-c4e5525' -o=./asdf ./cmd/asdf
go: downloading go1.23.4 (linux/amd64)

@jacekkujawski
Copy link

jacekkujawski commented Jan 31, 2025

This is definitely a bug. If i follow the step of Build from source, i will get this when executing make:

make
go build -ldflags='-s -X main.version=v0.15.0-c4e5525' -o=./asdf ./cmd/asdf
go: downloading go1.23.4 (linux/amd64)

That's exactly what I mentioned in my comment. the version.txt file should be updated to fix this issue, or change the way of how the app is being built. Right now the maintainer should locally update the file and push the change with new tag, e.g. v0.16.1 and make it latest. This should fix the issue for people who use asdf action.

@nguyenvinhlinh
Copy link

no related to the issue! before asdf is neutral with shell script implementation. Now, it's depending on golang. I like the old design!

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

No branches or pull requests

6 participants