-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
x/tools/gopls: vim-installed gopls@v0.14.2 does not work (but command-line installed gopls@v0.14.2 is OK) #64889
Comments
cc @findleyr |
Sounds like they were built with different versions of Go. Can you do |
Not working version mentioned below, the other version mentioned above works. One more information, when I have go 1.22 in my PATH, gopls in vim go 1.21.0 , was having issue but when I change to PATH go 1.21 version, vim gopls does it work. So i tried replacing gopls with go install with go 1.22
|
@raghvenders What is the go version of your project's go.mod or go.work file? You mentioned go1.22. If the project requires go1.22 or you are using go1.22, gopls needs to be built with go1.22 or a newer version. I am not sure how vim installs gopls. Can you check if vim uses go1.22 (not yet released)? |
@hyangah - My project is go 1.21.x, vim installs gopls with go 1.21.x and does it work. But when I do go1.22 development, I updated PATH to devel go1.22. Once I have done that, gopls which already got installed in We have to have gopls installed with go1.22(Manually). This I did not encounter at vscode editor, where gopls is identified or installed when editor is reload with command of local development go 1.22 is configured
|
@hyangah - One relatable reason could be vim lsp packages for go - gopls is installed and used on a its own package dependencies (mason) location rather than a GOPATH. |
It is installing if we do it manually. No issues. |
ATTENTION: Please answer these questions BEFORE submitting your issue. Thanks!
What did you do?
If possible, provide a recipe for reproducing the error.
For a Vim based editor, the editor takes care of lsp -> gopls configured. But gopls is not working as expected, however when I did a
And try to copy binary to vim configured location that works expected.
Both the gopls show the version as
golang.org/x/tools/gopls v0.14.2
golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=
What did you expect to see?
Both gopls are of same version I was expecting both to work.
What did you see instead?
One is working and other is not , I am seeing both the binaries are of different size but same version. Is there a way to find the diff ?
Below is the LSP log error :
Build info
Please let me know if you need more details.
The text was updated successfully, but these errors were encountered: