From 9f0747e8f8510a482ca9a7dd3b05ce5824c2fbbd Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Mon, 31 Mar 2025 22:32:11 +0900 Subject: [PATCH 1/3] chore(asdf): Add warning for incompatible version users --- plugins/asdf/README.md | 5 +++++ plugins/asdf/asdf.plugin.zsh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/plugins/asdf/README.md b/plugins/asdf/README.md index e8ff2d740..1e805c402 100644 --- a/plugins/asdf/README.md +++ b/plugins/asdf/README.md @@ -34,6 +34,11 @@ asdf set nodejs latest asdf set -u nodejs 16.5.0 ``` +## Backward Compatibility + +`asdf` has significantly changed since 0.16.0. The current implementation doesn't along with older versions. **If you're using 0.15.0 or older version, please follow upgrade guide in official page**: https://asdf-vm.com/guide/upgrading-to-v0-16.html. + + ## Maintainer - [@RobLoach](https://github.com/RobLoach) diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index 318267dcb..438152ed8 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -1,5 +1,10 @@ (( ! $+commands[asdf] )) && return +# TODO(roeniss): 2025-03-31 - remove this warning and related README section after enough grace period. +if [[ -d "$HOME/.asdf" ]]; then + echo "[omz] You have enabled asdf plugin, but your asdf version seems too low. Please upgrade to at least 0.16.0 to use completion. See omz asdf plugin README for more details." +fi + export ASDF_DATA_DIR="${ASDF_DATA_DIR:-$HOME/.asdf}" path=("$ASDF_DATA_DIR/shims" $path) From 6ed551d0ad1ca77b3374d55ec4bac749694fd487 Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Wed, 2 Apr 2025 00:35:03 +0900 Subject: [PATCH 2/3] chore(asdf): Change logic for checking version --- plugins/asdf/asdf.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/asdf/asdf.plugin.zsh b/plugins/asdf/asdf.plugin.zsh index 438152ed8..c87d69e64 100644 --- a/plugins/asdf/asdf.plugin.zsh +++ b/plugins/asdf/asdf.plugin.zsh @@ -1,7 +1,7 @@ (( ! $+commands[asdf] )) && return # TODO(roeniss): 2025-03-31 - remove this warning and related README section after enough grace period. -if [[ -d "$HOME/.asdf" ]]; then +if ! asdf --version 2>/dev/null | grep -q "asdf version"; then echo "[omz] You have enabled asdf plugin, but your asdf version seems too low. Please upgrade to at least 0.16.0 to use completion. See omz asdf plugin README for more details." fi From 12a8e4860d5cb69e02c8adf44e04a8da7d965033 Mon Sep 17 00:00:00 2001 From: Roeniss Moon Date: Wed, 2 Apr 2025 00:37:33 +0900 Subject: [PATCH 3/3] chore(asdf): Typo in README --- plugins/asdf/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/asdf/README.md b/plugins/asdf/README.md index 1e805c402..6d95826ca 100644 --- a/plugins/asdf/README.md +++ b/plugins/asdf/README.md @@ -36,7 +36,7 @@ asdf set -u nodejs 16.5.0 ## Backward Compatibility -`asdf` has significantly changed since 0.16.0. The current implementation doesn't along with older versions. **If you're using 0.15.0 or older version, please follow upgrade guide in official page**: https://asdf-vm.com/guide/upgrading-to-v0-16.html. +`asdf` has significantly changed since 0.16.0. The current implementation doesn’t align with older versions. **If you're using 0.15.0 or older version, please follow upgrade guide in official page**: https://asdf-vm.com/guide/upgrading-to-v0-16.html. ## Maintainer