Open valxntine opened 1 month ago
i have had gopls installed for a few months now and with a recent update of gopls or mason (not sure) this is happening to me now. I am getting the same thing. Just trying to help hunt down when / where this started.
could you verify your go version
?
I had the same error and it turns out I had the 1.17.2
version installed on my machine!
I updated to the latest (1.22.5
) and it works now
I updated Go to 1.22.6
and it's still failing.
Here is a workaround that worked for me..
gopls
from Mason (if already installed)go install -v golang.org/x/tools/gopls@latest
from your CLIgopls
from MasonHere is a workaround that worked for me..
* uninstall `gopls` from Mason (if already installed) * manually run `go install -v golang.org/x/tools/gopls@latest` from your CLI * re-open nvim and try to re-install `gopls` from Mason
this fixed for me, thank you
EDIT: Looks like my problem is more like https://github.com/williamboman/mason.nvim/issues/1657.
Hello! Just chiming in case this is related; I also cannot install gopls, but with a different error.
I'm using latest version of Mason, and a slightly newer nvim version:
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1724512491
I get essentially identical results for healthcheck (i.e no warnings in Mason for go).
The error I get is around the link step, and the workaround above does not solve it for me (i.e I have installed `gopls` in my cli with no issue, but the Mason install still fails) Happy to open a different issue if more appropriate and/or more detail needed.
My go version is `go1.22.5 darwin/arm64`, managed via mise.
The error message I get:
```
[ERROR Thu 29 Aug 09:02:16 2024] ...e/nvim/lazy/mason.nvim/lua/mason-core/installer/init.lua:249: Installation failed for Package(name=gopls) error='Tried to link bin "gopls" to non-existent target "gopls".'
```
The logs of the install, trace level, leading up to that error:
```
[DEBUG Thu 29 Aug 09:02:15 2024] .../mason.nvim/lua/mason-core/installer/managers/golang.lua:16: golang: install "golang.org/x/tools/gopls" "v0.16.1" {}
[DEBUG Thu 29 Aug 09:02:15 2024] ...al/share/nvim/lazy/mason.nvim/lua/mason-core/process.lua:116: Spawning cmd="go", spawn_opts={
args = { "install", "-v", "golang.org/x/tools/gopls@v0.16.1" },
cwd = "/Users/daogilvie/.local/share/nvim/mason/staging/gopls",
env = { "ITERM_ENABLE_SHELL_INTEGRATION_WITH_TMUX=
I've searched open issues for similar requests
I've recently downloaded the latest plugin version of mason.nvim
Problem description
When trying to install
gopls
it fails with the following:I've updated all plugins with Lazy, everything is up to date:
And running the healthcheck for Mason doesn't point to any obvious issues
Expected behavior
gopls is installed and usable
Affected packages
gopls
Mason output
No response
Installation log
Neovim version (>= 0.7)
NVIM v0.10.0-dev-693+g63b340855-Homebrew Build type: Release LuaJIT 2.1.1703358377
Operating system/version
macOS Sonoma 14.5
Healthcheck
Screenshots
No response