You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Greetings! I am the author of https://github.com/asdf-community/asdf-nim. I make regular use of the ref:foo tool identifier syntax to install nightly builds of certain git branches when available, or fallback to building from source when not available.
ref:foo seems to install ok, but asdf fails to find or use the installed version:
export ASDF_NIM_VERSION=ref:version-2-2
asdf install nim # works
asdf which nim # fails with `No nim executable found for nim`
asdf reshim
asf which nim # still fails with `No nim executable found for nim`
If I do this, it does show that the the version has been installed (with ":" replaced by "-"):
$ asdf list nim
ref-version-2-2
So, the ref: identifier works okay for installation, but not for shims or calling which.
There is a hacky workaround, which is setting ASDF_NIM_VERSION=ref-version-2-2 after ref:version-2-2 has been installed.
Steps to Reproduce
Here is a minimal Dockerfile to reproduce:
FROM debian:bookworm-slim
ENV ASDF_DATA_DIR="/root/.asdf"ENV PATH="${ASDF_DATA_DIR}/shims:/root/.nimble/bin:/usr/local/go/bin:$PATH"# 2.2 nightly buildENV ASDF_NIM_VERSION="ref:version-2-2"# Install dependenciesRUN apt-get update && apt-get install -y \
curl \
git \
build-essential \
libssl-dev \
coreutils \
&& rm -rf /var/lib/apt/lists/*
# Install golang (req of asdf)RUN curl -fsSL https://go.dev/dl/go1.24.0.linux-arm64.tar.gz | tar -C /usr/local -xz
# Install asdf, asdf-nim, and nimRUN git clone https://github.com/asdf-vm/asdf.git --depth 1 --branch v0.16.4 && \
cd asdf && \
make && \
ln -s ${PWD}/asdf /usr/local/bin/asdf && \
asdf plugin add nim && \
asdf install && \
asdf reshim
# Fails with:# No executable nim found for current version. Please select a different version or install nim manually for the current versionRUN nim -v
Expected Behaviour
asdf should find and execute nim using ref:version-2-2 in ASDF_NIM_VERSION or a .tool-versions file.
Actual Behaviour
asdf cannot execute nim when the tool version is ref:version-2-2.
Environment
# asdf info
OS:
Linux f59c3c778768 6.12.5-linuxkit #1 SMP Tue Jan 21 10:23:32 UTC 2025 aarch64 GNU/Linux
SHELL:
GNU bash, version 5.2.15(1)-release (aarch64-unknown-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.15(1)-release
ASDF VERSION:
"4b9297b-dev"
ASDF INTERNAL VARIABLES:
ASDF_DEFAULT_TOOL_VERSIONS_FILENAME=.tool-versions
ASDF_DATA_DIR=/root/.asdf
ASDF_CONFIG_FILE=/root/.asdfrc
ASDF INSTALLED PLUGINS:
nim https://github.com/asdf-community/asdf-nim.git d35061b74828466fb3c204d76de57b94a02d2176
asdf plugins affected (if relevant)
asdf-nim
The text was updated successfully, but these errors were encountered:
I have been having the same issue but as it relates to ref builds for erlang and elixir. I have prepared a PR that ostensibly resolves this issue #2049.
Describe the Bug
Greetings! I am the author of https://github.com/asdf-community/asdf-nim. I make regular use of the
ref:foo
tool identifier syntax to install nightly builds of certain git branches when available, or fallback to building from source when not available.ref:foo
seems to install ok, but asdf fails to find or use the installed version:If I do this, it does show that the the version has been installed (with ":" replaced by "-"):
So, the
ref:
identifier works okay for installation, but not for shims or callingwhich
.There is a hacky workaround, which is setting
ASDF_NIM_VERSION=ref-version-2-2
afterref:version-2-2
has been installed.Steps to Reproduce
Here is a minimal Dockerfile to reproduce:
Expected Behaviour
asdf should find and execute nim using
ref:version-2-2
in ASDF_NIM_VERSION or a .tool-versions file.Actual Behaviour
asdf cannot execute nim when the tool version is
ref:version-2-2
.Environment
asdf plugins affected (if relevant)
asdf-nim
The text was updated successfully, but these errors were encountered: