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: system version specified in .tool-versions triggers "No version is set" warnings #1959

Open
meithon opened this issue Feb 15, 2025 · 0 comments
Labels

Comments

@meithon
Copy link

meithon commented Feb 15, 2025

Describe the Bug

When using asdf, you can specify system in the .tool-versions file to use the version installed on your system.

However, currently when system is specified, warning messages about "no version set" are displayed during shell startup. This is problematic for several reasons:

  1. Warning messages are displayed even though system is a valid configuration
  2. Unnecessary warning messages appear every time the shell starts
  3. It may confuse users (it appears as if the configuration is incorrect, even though it's actually using the system version as intended)

This behavior should be fixed to properly recognize system as a valid setting and suppress these warning messages.

Steps to Reproduce

❯ cat ~/.tool-versions
nodejs system
golang system
java system
rust system
❯ exec zsh
No version is set for rust; please run asdf set [options] rust <version>
No version is set for golang; please run asdf set [options] golang <version>
No version is set for nodejs; please run asdf set [options] nodejs <version>
No version is set for java; please run asdf set [options] java <version>

Expected Behaviour

When system is specified as the version in .tool-versions, asdf should use the system-installed version of the tool without displaying warning messages.

Actual Behaviour

When .tool-versions contains:

nodejs system
golang system
java system
rust system

The following warnings are displayed on shell startup:

No version is set for rust; please run `asdf set [options] rust <version>`
No version is set for golang; please run `asdf set [options] golang <version>`
No version is set for nodejs; please run `asdf set [options] nodejs <version>`
No version is set for java; please run `asdf set [options] java <version>`

Environment

❯ asdf info
OS:
Darwin meinoMacBook-Pro.local 23.2.0 Darwin Kernel Version 23.2.0: Wed Nov 15 21:55:06 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6020 arm64

SHELL:
zsh 5.9 (x86_64-apple-darwin23.0)

BASH VERSION:
5.2.37(1)-release

ASDF VERSION:
0.16.2

ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/Users/mei/.asdf
ASDF_CONFIG_FILE=/Users/mei/.asdfrc

ASDF INSTALLED PLUGINS:
golang    https://github.com/asdf-community/asdf-golang.git e2527a31714da7bc671a684308579f4ef8863281
java      https://github.com/halcyon/asdf-java.git          def7bb7354a211cd00de79947bb3e4537418be60
nodejs    https://github.com/asdf-vm/asdf-nodejs.git        93bd217ba74f05080eebb7d8e1c146a385b01d7f
rust      https://github.com/code-lever/asdf-rust.git       95acf4fe65df1de74fca502482b8f3ac5af73c05

asdf plugins affected (if relevant)

No response

@meithon meithon added the bug label Feb 15, 2025
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

1 participant