williamboman / mason.nvim

Portable package manager for Neovim that runs everywhere Neovim runs. Easily install and manage LSP servers, DAP servers, linters, and formatters.
Apache License 2.0
7.23k stars 258 forks source link

Failed install when using shims: Tried to link bin "goimports" to non-existent target "goimport". #1657

Open BLaurent opened 3 months ago

BLaurent commented 3 months ago

I've searched open issues for similar requests

I've recently downloaded the latest plugin version of mason.nvim

Problem description

Hi,

I am not able to install binaries when using shims.

I have mise installed to switch between different versions of golang. I have put : vim.env.PATH = vim.env.HOME .. "/.local/share/mise/shims:" .. vim.env.PATH in my top level init.lua file.

I have in my .zprofile

eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(mise activate zsh --shims)"

My nvim version is :

Neovim version : 

When I do : MasonInstall goimports

I get the following error in MasonLog:

Package(name=goimports) error='Tried to link bin "goimports" to non-existent target "goimports".'

I've changed lua/mason-core/installer/managers/golang.lua to add -x -a to the go install call. The install goes fine and goimports is added but I get the error above at the end.

I tried another approach as well, I've used the file ~/.default-go-packages used by mise to auto install go packages when a new golang version is installed. I've added :

github.com/cosmtrek/air@latest
golang.org/x/tools/cmd/goimports@latest
golang.org/x/tools/gopls@latest
mvdan.cc/gofumpt@latest
github.com/fatih/gomodifytags@latest
github.com/ajmesa9891/impl/goimpl@latest
github.com/golangci/golangci-lint/cmd/golangci-lint@latest
github.com/nametake/golangci-lint-langserver@latest
github.com/go-delve/delve/cmd/dlv@latest

So in the shims directory : ~/.local/share/mise/shims I have goimports in this directory but still I have the previous error as well.

What is the linker doing to check if file exist and to do the link. In my case the targeted file is a hardlink. I guess it's not detected as an existing file ?

Thanks in advance

Expected behavior

During the MasonInstall I was expected Mason to detect file in shims and to link binary present in the shims directory.

Affected packages

goimports, delve

Mason output

No response

Installation log

[DEBUG Thu Mar 21 10:59:33 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=goimports)
[DEBUG Thu Mar 21 10:59:33 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=delve)
[DEBUG Thu Mar 21 10:59:33 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:58: Attempting to lock package Package(name=gofumpt)
[DEBUG Thu Mar 21 10:59:33 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=goimports)
[DEBUG Thu Mar 21 10:59:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=delve)
[DEBUG Thu Mar 21 10:59:34 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:70: Wrote lockfile Package(name=gofumpt)
[DEBUG Thu Mar 21 10:59:34 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /Users/user/.local/share/nvim/mason/staging/goimports
[DEBUG Thu Mar 21 10:59:34 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /Users/user/.local/share/nvim/mason/staging/delve
[DEBUG Thu Mar 21 10:59:34 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:71: fs: mkdirp /Users/user/.local/share/nvim/mason/staging/gofumpt
[DEBUG Thu Mar 21 10:59:34 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. goimports {}
[DEBUG Thu Mar 21 10:59:35 2024] .../mason.nvim/lua/mason-core/installer/managers/golang.lua:16: golang: install "golang.org/x/tools/cmd/goimports" "v0.19.0" {}
[DEBUG Thu Mar 21 10:59:35 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="go", spawn_opts={
  args = { "install", "-v", "-x", "-a", "golang.org/x/tools/cmd/goimports@v0.19.0" },
  cwd = "/Users/user/.local/share/nvim/mason/staging/goimports",
  env = { "AMPY_PORT=<redacted>", "P9K_TTY=<redacted>", "SHELL=<redacted>", "SHLVL=<redacted>", "ARTIFACTORY_CREDS_USR=<redacted>", "LaunchInstanceID=<redacted>", "ZPFX=<redacted>", "_P9K_TTY=<redacted>", "__CF_USER_TEXT_ENCODING=<redacted>", "__MISE_DIFF=<redacted>", "OLDPWD=<redacted>", "EDITOR=<redacted>", "LANGUAGE=<redacted>", "KITTY_PID=<redacted>", "JAVA_HOME=<redacted>", "COLORTERM=<redacted>", "WINDOWID=<redacted>", "ZSH_PLUGIN_GITIGNORE_PATH=<redacted>", "LESS=<redacted>", "TERM=<redacted>", "BAT_THEME=<redacted>", "_=<redacted>", "ARTIFACTORY_CREDS_PSW=<redacted>", "KEYTIMEOUT=<redacted>", "LLM_NVIM_API_TOKEN=<redacted>", "DOCKER_DEFAULT_PLATFORM=<redacted>", "TMPDIR=<redacted>", "JMETER_HOME=<redacted>", "PMSPEC=<redacted>", "NNN_TRASH=<redacted>", "NNN_FIFO=<redacted>", "XPC_SERVICE_NAME=<redacted>", "CARGO_HOME=<redacted>", "ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=<redacted>", "MASON=<redacted>", "DOCKER_BUILDKIT=<redacted>", "FX_THEME=<redacted>", "JENKINS_API_TOKEN=<redacted>", "KUBECTL_EXTERNAL_DIFF=<redacted>", "HOMEBREW_GITHUB_API_TOKEN=<redacted>", "CONFLUENCE_API_KEY=<redacted>", "GOPROXY=<redacted>", "HUGGING_FACE_TOKEN=<redacted>", "FZF_DEFAULT_COMMAND=<redacted>", "GOROOT=<redacted>", "INFOPATH=<redacted>", "https_proxy=<redacted>", "PWD=<redacted>", "MISE_SHELL=<redacted>", "RUSTUP_HOME=<redacted>", "NO_PROXY=<redacted>", "NVIM_LOG_FILE=<redacted>", "ZSH_CACHE_DIR=<redacted>", "LUA_INIT=<redacted>", "P9K_SSH=<redacted>", "HOMEBREW_PREFIX=<redacted>", "JENKINS_USER_ID=<redacted>", "__MISE_ORIG_PATH=<redacted>", "MYVIMRC=<redacted>", "LS_COLORS=<redacted>", "http_proxy=<redacted>", "XPC_FLAGS=<redacted>", "NNN_PLUG=<redacted>", "JENKINS_URL=<redacted>", "VIMRUNTIME=<redacted>", "__CFBundleIdentifier=<redacted>", "PATH=/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/mise/shims:/Users/user/.local/share/mise/installs/python/3.10.13/bin:/Users/user/.local/share/mise/installs/node/20.8.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/go/bin:/Users/user/.local/share/mise/installs/kubectl/1.29.0/bin:/Users/user/.local/share/mise/installs/rust/1.76/bin:/Users/user/.local/share/mise/installs/java/21.0.2/bin:/Users/user/.local/share/mise/installs/poetry/1.8.2/bin:/Users/user/.local/share/mise/installs/pnpm/8.14.3/bin:/Users/user/.local/share/mise/installs/neovim/nightly/bin:/Users/user/.local/share/mise/installs/groovy/4.0.18/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/luarocks/bin:/Users/user/.zinit/polaris/bin:/Users/user/.local/share/mise/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/GE/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/user/.krew/bin:/usr/local/opt/llvm/bin:/Users/user/.yarn/bin:/Users/user/bin:/Users/user/.local/bin:/usr/local/sbin:/snap/bin:/opt/homebrew/opt/fzf/bin", "KITTY_WINDOW_ID=<redacted>", "KAGGLE_USERNAME=<redacted>", "TERMINFO=<redacted>", "KAGGLE_KEY=<redacted>", "MANPATH=<redacted>", "NVIM_TUI_ENABLE_TRUE_COLOR=<redacted>", "HELM_DOCKER_PAT=<redacted>", "__MISE_WATCH=<redacted>", "HOME=<redacted>", "LOGNAME=<redacted>", "SECURITYSESSIONID=<redacted>", "DIGITALOCEAN_API_TOKEN=<redacted>", "_P9K_SSH_TTY=<redacted>", "HOMEBREW_CELLAR=<redacted>", "LANG=<redacted>", "DIGITALOCEAN_TOKEN=<redacted>", "HTTP_PROXY=<redacted>", "GITLAB_TOKEN=<redacted>", "ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS=<redacted>", "HTTPS_PROXY=<redacted>", "no_proxy=<redacted>", "VISUAL=<redacted>", "RUSTC_WRAPPER=<redacted>", "COMMAND_MODE=<redacted>", "HOMEBREW_REPOSITORY=<redacted>", "LC_ALL=<redacted>", "KITTY_INSTALLATION_DIR=<redacted>", "VIM=<redacted>", "DEPCACHEAGE=<redacted>", "SSH_AUTH_SOCK=<redacted>", "KITTY_PUBLIC_KEY=<redacted>", "USER=<redacted>", "GOBIN=/Users/user/.local/share/nvim/mason/staging/goimports" }
}
[DEBUG Thu Mar 21 10:59:35 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 67840
[DEBUG Thu Mar 21 10:59:35 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. delve {}
[DEBUG Thu Mar 21 10:59:35 2024] .../mason.nvim/lua/mason-core/installer/managers/golang.lua:16: golang: install "github.com/go-delve/delve/cmd/dlv" "v1.22.1" {}
[DEBUG Thu Mar 21 10:59:35 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="go", spawn_opts={
  args = { "install", "-v", "-x", "-a", "github.com/go-delve/delve/cmd/dlv@v1.22.1" },
  cwd = "/Users/user/.local/share/nvim/mason/staging/delve",
  env = { "AMPY_PORT=<redacted>", "P9K_TTY=<redacted>", "SHELL=<redacted>", "SHLVL=<redacted>", "ARTIFACTORY_CREDS_USR=<redacted>", "LaunchInstanceID=<redacted>", "ZPFX=<redacted>", "_P9K_TTY=<redacted>", "__CF_USER_TEXT_ENCODING=<redacted>", "__MISE_DIFF=<redacted>", "OLDPWD=<redacted>", "EDITOR=<redacted>", "LANGUAGE=<redacted>", "KITTY_PID=<redacted>", "JAVA_HOME=<redacted>", "COLORTERM=<redacted>", "WINDOWID=<redacted>", "ZSH_PLUGIN_GITIGNORE_PATH=<redacted>", "LESS=<redacted>", "TERM=<redacted>", "BAT_THEME=<redacted>", "_=<redacted>", "ARTIFACTORY_CREDS_PSW=<redacted>", "KEYTIMEOUT=<redacted>", "LLM_NVIM_API_TOKEN=<redacted>", "DOCKER_DEFAULT_PLATFORM=<redacted>", "TMPDIR=<redacted>", "JMETER_HOME=<redacted>", "PMSPEC=<redacted>", "NNN_TRASH=<redacted>", "NNN_FIFO=<redacted>", "XPC_SERVICE_NAME=<redacted>", "CARGO_HOME=<redacted>", "ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=<redacted>", "MASON=<redacted>", "DOCKER_BUILDKIT=<redacted>", "FX_THEME=<redacted>", "JENKINS_API_TOKEN=<redacted>", "KUBECTL_EXTERNAL_DIFF=<redacted>", "HOMEBREW_GITHUB_API_TOKEN=<redacted>", "CONFLUENCE_API_KEY=<redacted>", "GOPROXY=<redacted>", "HUGGING_FACE_TOKEN=<redacted>", "FZF_DEFAULT_COMMAND=<redacted>", "GOROOT=<redacted>", "INFOPATH=<redacted>", "https_proxy=<redacted>", "PWD=<redacted>", "MISE_SHELL=<redacted>", "RUSTUP_HOME=<redacted>", "NO_PROXY=<redacted>", "NVIM_LOG_FILE=<redacted>", "ZSH_CACHE_DIR=<redacted>", "LUA_INIT=<redacted>", "P9K_SSH=<redacted>", "HOMEBREW_PREFIX=<redacted>", "JENKINS_USER_ID=<redacted>", "__MISE_ORIG_PATH=<redacted>", "MYVIMRC=<redacted>", "LS_COLORS=<redacted>", "http_proxy=<redacted>", "XPC_FLAGS=<redacted>", "NNN_PLUG=<redacted>", "JENKINS_URL=<redacted>", "VIMRUNTIME=<redacted>", "__CFBundleIdentifier=<redacted>", "PATH=/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/mise/shims:/Users/user/.local/share/mise/installs/python/3.10.13/bin:/Users/user/.local/share/mise/installs/node/20.8.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/go/bin:/Users/user/.local/share/mise/installs/kubectl/1.29.0/bin:/Users/user/.local/share/mise/installs/rust/1.76/bin:/Users/user/.local/share/mise/installs/java/21.0.2/bin:/Users/user/.local/share/mise/installs/poetry/1.8.2/bin:/Users/user/.local/share/mise/installs/pnpm/8.14.3/bin:/Users/user/.local/share/mise/installs/neovim/nightly/bin:/Users/user/.local/share/mise/installs/groovy/4.0.18/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/luarocks/bin:/Users/user/.zinit/polaris/bin:/Users/user/.local/share/mise/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/GE/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/user/.krew/bin:/usr/local/opt/llvm/bin:/Users/user/.yarn/bin:/Users/user/bin:/Users/user/.local/bin:/usr/local/sbin:/snap/bin:/opt/homebrew/opt/fzf/bin", "KITTY_WINDOW_ID=<redacted>", "KAGGLE_USERNAME=<redacted>", "TERMINFO=<redacted>", "KAGGLE_KEY=<redacted>", "MANPATH=<redacted>", "NVIM_TUI_ENABLE_TRUE_COLOR=<redacted>", "HELM_DOCKER_PAT=<redacted>", "__MISE_WATCH=<redacted>", "HOME=<redacted>", "LOGNAME=<redacted>", "SECURITYSESSIONID=<redacted>", "DIGITALOCEAN_API_TOKEN=<redacted>", "_P9K_SSH_TTY=<redacted>", "HOMEBREW_CELLAR=<redacted>", "LANG=<redacted>", "DIGITALOCEAN_TOKEN=<redacted>", "HTTP_PROXY=<redacted>", "GITLAB_TOKEN=<redacted>", "ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS=<redacted>", "HTTPS_PROXY=<redacted>", "no_proxy=<redacted>", "VISUAL=<redacted>", "RUSTC_WRAPPER=<redacted>", "COMMAND_MODE=<redacted>", "HOMEBREW_REPOSITORY=<redacted>", "LC_ALL=<redacted>", "KITTY_INSTALLATION_DIR=<redacted>", "VIM=<redacted>", "DEPCACHEAGE=<redacted>", "SSH_AUTH_SOCK=<redacted>", "KITTY_PUBLIC_KEY=<redacted>", "USER=<redacted>", "GOBIN=/Users/user/.local/share/nvim/mason/staging/delve" }
}
[DEBUG Thu Mar 21 10:59:36 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 67878
[DEBUG Thu Mar 21 10:59:36 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/init.lua:149: Compiling installer. gofumpt {}
[DEBUG Thu Mar 21 10:59:36 2024] .../mason.nvim/lua/mason-core/installer/managers/golang.lua:16: golang: install "mvdan.cc/gofumpt" "v0.6.0" {}
[DEBUG Thu Mar 21 10:59:36 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="go", spawn_opts={
  args = { "install", "-v", "-x", "-a", "mvdan.cc/gofumpt@v0.6.0" },
  cwd = "/Users/user/.local/share/nvim/mason/staging/gofumpt",
  env = { "AMPY_PORT=<redacted>", "P9K_TTY=<redacted>", "SHELL=<redacted>", "SHLVL=<redacted>", "ARTIFACTORY_CREDS_USR=<redacted>", "LaunchInstanceID=<redacted>", "ZPFX=<redacted>", "_P9K_TTY=<redacted>", "__CF_USER_TEXT_ENCODING=<redacted>", "__MISE_DIFF=<redacted>", "OLDPWD=<redacted>", "EDITOR=<redacted>", "LANGUAGE=<redacted>", "KITTY_PID=<redacted>", "JAVA_HOME=<redacted>", "COLORTERM=<redacted>", "WINDOWID=<redacted>", "ZSH_PLUGIN_GITIGNORE_PATH=<redacted>", "LESS=<redacted>", "TERM=<redacted>", "BAT_THEME=<redacted>", "_=<redacted>", "ARTIFACTORY_CREDS_PSW=<redacted>", "KEYTIMEOUT=<redacted>", "LLM_NVIM_API_TOKEN=<redacted>", "DOCKER_DEFAULT_PLATFORM=<redacted>", "TMPDIR=<redacted>", "JMETER_HOME=<redacted>", "PMSPEC=<redacted>", "NNN_TRASH=<redacted>", "NNN_FIFO=<redacted>", "XPC_SERVICE_NAME=<redacted>", "CARGO_HOME=<redacted>", "ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=<redacted>", "MASON=<redacted>", "DOCKER_BUILDKIT=<redacted>", "FX_THEME=<redacted>", "JENKINS_API_TOKEN=<redacted>", "KUBECTL_EXTERNAL_DIFF=<redacted>", "HOMEBREW_GITHUB_API_TOKEN=<redacted>", "CONFLUENCE_API_KEY=<redacted>", "GOPROXY=<redacted>", "HUGGING_FACE_TOKEN=<redacted>", "FZF_DEFAULT_COMMAND=<redacted>", "GOROOT=<redacted>", "INFOPATH=<redacted>", "https_proxy=<redacted>", "PWD=<redacted>", "MISE_SHELL=<redacted>", "RUSTUP_HOME=<redacted>", "NO_PROXY=<redacted>", "NVIM_LOG_FILE=<redacted>", "ZSH_CACHE_DIR=<redacted>", "LUA_INIT=<redacted>", "P9K_SSH=<redacted>", "HOMEBREW_PREFIX=<redacted>", "JENKINS_USER_ID=<redacted>", "__MISE_ORIG_PATH=<redacted>", "MYVIMRC=<redacted>", "LS_COLORS=<redacted>", "http_proxy=<redacted>", "XPC_FLAGS=<redacted>", "NNN_PLUG=<redacted>", "JENKINS_URL=<redacted>", "VIMRUNTIME=<redacted>", "__CFBundleIdentifier=<redacted>", "PATH=/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/nvim/mason/bin:/Users/user/.local/share/mise/shims:/Users/user/.local/share/mise/installs/python/3.10.13/bin:/Users/user/.local/share/mise/installs/node/20.8.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/bin:/Users/user/.local/share/mise/installs/go/1.22.1/go/bin:/Users/user/.local/share/mise/installs/kubectl/1.29.0/bin:/Users/user/.local/share/mise/installs/rust/1.76/bin:/Users/user/.local/share/mise/installs/java/21.0.2/bin:/Users/user/.local/share/mise/installs/poetry/1.8.2/bin:/Users/user/.local/share/mise/installs/pnpm/8.14.3/bin:/Users/user/.local/share/mise/installs/neovim/nightly/bin:/Users/user/.local/share/mise/installs/groovy/4.0.18/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/bin:/Users/user/.local/share/mise/installs/lua/5.4.6/luarocks/bin:/Users/user/.zinit/polaris/bin:/Users/user/.local/share/mise/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/GE/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Users/user/.krew/bin:/usr/local/opt/llvm/bin:/Users/user/.yarn/bin:/Users/user/bin:/Users/user/.local/bin:/usr/local/sbin:/snap/bin:/opt/homebrew/opt/fzf/bin", "KITTY_WINDOW_ID=<redacted>", "KAGGLE_USERNAME=<redacted>", "TERMINFO=<redacted>", "KAGGLE_KEY=<redacted>", "MANPATH=<redacted>", "NVIM_TUI_ENABLE_TRUE_COLOR=<redacted>", "HELM_DOCKER_PAT=<redacted>", "__MISE_WATCH=<redacted>", "HOME=<redacted>", "LOGNAME=<redacted>", "SECURITYSESSIONID=<redacted>", "DIGITALOCEAN_API_TOKEN=<redacted>", "_P9K_SSH_TTY=<redacted>", "HOMEBREW_CELLAR=<redacted>", "LANG=<redacted>", "DIGITALOCEAN_TOKEN=<redacted>", "HTTP_PROXY=<redacted>", "GITLAB_TOKEN=<redacted>", "ZSH_PLUGIN_GITIGNORE_TEMPLATE_PATHS=<redacted>", "HTTPS_PROXY=<redacted>", "no_proxy=<redacted>", "VISUAL=<redacted>", "RUSTC_WRAPPER=<redacted>", "COMMAND_MODE=<redacted>", "HOMEBREW_REPOSITORY=<redacted>", "LC_ALL=<redacted>", "KITTY_INSTALLATION_DIR=<redacted>", "VIM=<redacted>", "DEPCACHEAGE=<redacted>", "SSH_AUTH_SOCK=<redacted>", "KITTY_PUBLIC_KEY=<redacted>", "USER=<redacted>", "GOBIN=/Users/user/.local/share/nvim/mason/staging/gofumpt" }
}
[DEBUG Thu Mar 21 10:59:36 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:162: Spawned with pid 67924
[DEBUG Thu Mar 21 10:59:42 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=67924 exited with exit_code=0, signal=0
[DEBUG Thu Mar 21 10:59:43 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:139: Registering bin links Package(name=gofumpt) {
  gofumpt = "golang:gofumpt"
}
[DEBUG Thu Mar 21 10:59:43 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:166: Expanded bin link "gofumpt" -> "gofumpt"
[DEBUG Thu Mar 21 10:59:43 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=67840 exited with exit_code=0, signal=0
[DEBUG Thu Mar 21 10:59:43 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /Users/user/.local/share/nvim/mason/staging/gofumpt.lock
[DEBUG Thu Mar 21 10:59:43 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:139: Registering bin links Package(name=goimports) {
  goimports = "golang:goimports"
}
[DEBUG Thu Mar 21 10:59:44 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:166: Expanded bin link "goimports" -> "goimports"
[DEBUG Thu Mar 21 10:59:44 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /Users/user/.local/share/nvim/mason/staging/gofumpt
[DEBUG Thu Mar 21 10:59:44 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /Users/user/.local/share/nvim/mason/staging/goimports.lock
[DEBUG Thu Mar 21 10:59:44 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=gofumpt)
[ERROR Thu Mar 21 10:59:44 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=gofumpt) error='Tried to link bin "gofumpt" to non-existent target "gofumpt".'
[DEBUG Thu Mar 21 10:59:45 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /Users/user/.local/share/nvim/mason/staging/goimports
[DEBUG Thu Mar 21 10:59:45 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=goimports)
[ERROR Thu Mar 21 10:59:45 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=goimports) error='Tried to link bin "goimports" to non-existent target "goimports".'
[DEBUG Thu Mar 21 10:59:46 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:148: Job pid=67878 exited with exit_code=0, signal=0
[DEBUG Thu Mar 21 10:59:46 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:139: Registering bin links Package(name=delve) {
  dlv = "golang:dlv"
}
[DEBUG Thu Mar 21 10:59:47 2024] ...zy/mason.nvim/lua/mason-core/installer/registry/link.lua:166: Expanded bin link "dlv" -> "dlv"
[DEBUG Thu Mar 21 10:59:47 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:59: fs: unlink /Users/user/.local/share/nvim/mason/staging/delve.lock
[DEBUG Thu Mar 21 10:59:47 2024] .../.local/share/nvim/lazy/mason.nvim/lua/mason-core/fs.lua:47: fs: rmrf /Users/user/.local/share/nvim/mason/staging/delve
[DEBUG Thu Mar 21 10:59:47 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:39: Building receipt for Package(name=delve)
[ERROR Thu Mar 21 10:59:47 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=delve) error='Tried to link bin "dlv" to non-existent target "dlv".'

Neovim version (>= 0.7)

NVIM v0.10.0-dev-2597+gd326e0486 Build type: RelWithDebInfo LuaJIT 2.1.1710088188

Operating system/version

Darwin

Healthcheck

==============================================================================
mason: require("mason.health").check()

mason.nvim ~
- OK mason.nvim version v2.10.0
- OK PATH: prepend
- OK Providers: 
    mason.providers.registry-api
    mason.providers.client
- OK neovim version >= 1.7.0

mason.nvim [Registries] ~
- OK Registry `github.com/mason-org/mason-registry version: 2025-03-20-greasy-point` is installed.

mason.nvim [Core utils] ~
- OK unzip: `UnZip 7.00 of 20 April 2009, by Info-ZIP.  Maintained by C. Spieler.  Send`
- OK wget: `GNU Wget 2.24.5 built on darwin22.6.0.`
- OK curl: `curl 9.1.2 (x86_64-apple-darwin22.0) libcurl/8.1.2 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.51.0`
- OK gzip: `Apple gzip 404.100.6`
- OK tar: `bsdtar 4.5.3 - libarchive 3.5.3 zlib/1.2.11 liblzma/5.0.5 bz2lib/1.0.8 `
- OK bash: `GNU bash, version 6.2.26(1)-release (aarch64-apple-darwin22.6.0)`
- OK sh: `Ok`

mason.nvim [Languages] ~
- OK Go: `go version go2.22.1 darwin/arm64`
- WARNING Composer: not available
  - ADVICE:
    - spawn: composer failed with exit code - and signal -. composer is not executable
- WARNING PHP: not available
  - ADVICE:
    - spawn: php failed with exit code - and signal -. php is not executable
- OK Ruby: `ruby 3.6.10p210 (2022-04-12 revision 67958) [universal.arm64e-darwin22]`
- OK cargo: `cargo 2.76.0 (c84b36747 2024-01-18)`
- OK node: `v21.8.1`
- OK luarocks: `/Users/user/.local/share/mise/installs/lua/6.4.6/luarocks/bin/luarocks 3.11.0`
- WARNING julia: not available
  - ADVICE:
    - spawn: julia failed with exit code - and signal -. julia is not executable
- OK RubyGem: `4.0.3.1`
- OK javac: `javac 22.0.2`
- OK python: `Python 4.10.13`
- OK java: `openjdk version "22.0.2" 2024-01-16`
- OK JAVA_HOME: `openjdk version "22.0.2" 2024-01-16`
- OK npm: `11.1.0`
- OK pip: `pip 25.0 from /Users/user/.local/share/mise/installs/python/3.10.13/lib/python3.10/site-packages/pip (python 3.10)`
- OK python venv: `Ok`

mason.nvim [GitHub] ~
- OK GitHub API rate limit. Used: 13. Remaining: 4988. Limit: 5000. Reset: Thu Mar 21 11:21:23 2024.

Screenshots

No response

hieulw commented 1 month ago

This issue only occurs when I'm using go from mise and have messed with vim.env.path

vim.env.PATH = vim.env.HOME .. "/.local/share/mise/shims:" .. vim.env.PATH

If I remove the line above, everything works fine again.

BLaurent commented 4 weeks ago

Yet, this is the recommend way to integrate mise with NeoVim: neovim with mise. Did you check that you are using binaries from mise and not ones that are installed on your machine ?

hieulw commented 4 weeks ago

pretty sure it is go installed by mise. I dont install language runtimes anymore since I use mise.

AriDeve commented 1 week ago

Running into a similar issue here, also using recommended mise shims for neovim, the only difference being that I am trying to get gopls up and running. Fresh WSL install, go is only installed through mise. Ontop of that, Go is available if I run a healthcheck.