Skip to content

x/tools/gopls: vim-installed gopls@v0.14.2 does not work (but command-line installed gopls@v0.14.2 is OK) #64889

@Goclipse27

Description

@Goclipse27

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

go install -v golang.org/x/tools/gopls@latest

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 :

[ERROR][2023-12-28 08:27:26] ...lsp/handlers.lua:535 "2023/12/28 08:27:26 no signature help: cannot find an enclosing function\n\tposition=7:10\n"
[START][2023-12-28 08:50:17] LSP logging initiated
[ERROR][2023-12-28 08:50:17] ...lsp/handlers.lua:535 "2023/12/28 08:50:17 tidy: diagnosing file:///home/ragul/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.21.4.linux-amd64/src/go.mod: err: exit status 1: stderr: go: downloading golang.org/x/crypto v0.11.1-0.20230711161743-2e82bdd1719d\ngo: downloading golang.org/x/net v0.12.1-0.20231027154334-5ca955b1789c\ngo: std/crypto/ecdsa imports\n\tgolang.org/x/crypto/cryptobyte: module lookup disabled by GOPROXY=off\ngo: std/crypto/ecdsa imports\n\tgolang.org/x/crypto/cryptobyte/asn1: module lookup disabled by GOPROXY=off\ngo: std/crypto/tls imports\n\tgolang.org/x/crypto/chacha20poly1305: module lookup disabled by GOPROXY=off\ngo: std/crypto/tls imports\n\tgolang.org/x/crypto/hkdf: module lookup disabled by GOPROXY=off\ngo: std/net imports\n\tgolang.org/x/net/dns/dnsmessage: module lookup disabled by GOPROXY=off\ngo: std/net imports\n\tgolang.org/x/net/lif: module lookup disabled by GOPROXY=off\ngo: std/net imports\n\tgolang.org/x/net/route: module lookup disabled by GOPROXY=off\ngo: std/net/http imports\n\tgolang.org/x/net/http/httpguts: module lookup disabled by GOPROXY=off\ngo: std/net/http imports\n\tgolang.org/x/net/http/httpproxy: module lookup disabled by GOPROXY=off\ngo: std/net/http imports\n\tgolang.org/x/net/http2/hpack: module lookup disabled by GOPROXY=off\ngo: std/net/http imports\n\tgolang.org/x/net/idna: module lookup disabled by GOPROXY=off\ngo: std/crypto/ecdh tested by\n\tstd/crypto/ecdh.test imports\n\tgolang.org/x/crypto/chacha20: module lookup disabled by GOPROXY=off\ngo: std/net tested by\n\tstd/net.test imports\n\tgolang.org/x/net/nettest: module lookup disabled by GOPROXY=off\n\n"

Build info

golang.org/x/tools/gopls v0.14.2
    golang.org/x/tools/gopls@v0.14.2 h1:sIw6vjZiuQ9S7s0auUUkHlWgsCkKZFWDHmrge8LYsnc=
    github.com/BurntSushi/toml@v1.2.1 h1:9F2/+DoOYIOksmaJFPw1tGFy1eDnIJXg+UHjuD8lTak=
    github.com/google/go-cmp@v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
    github.com/sergi/go-diff@v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
    golang.org/x/exp/typeparams@v0.0.0-20221212164502-fae10dda9338 h1:2O2DON6y3XMJiQRAS1UWU+54aec2uopH3x7MAiqGW6Y=
    golang.org/x/mod@v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
    golang.org/x/sync@v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ=
    golang.org/x/sys@v0.14.0 h1:Vz7Qs629MkJkGyHxUlRHizWJRG2j8fbQKjELVSNhy7Q=
    golang.org/x/telemetry@v0.0.0-20231114163143-69313e640400 h1:brbkEFfGwNGAEkykUOcryE/JiHUMMJouzE0fWWmz/QU=
    golang.org/x/text@v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k=
    golang.org/x/tools@v0.14.1-0.20231114185516-c9d3e7de13fd h1:Oku7E+OCrXHyst1dG1z10etCTxewCHXNFLRlyMPbh3w=
    golang.org/x/vuln@v1.0.1 h1:KUas02EjQK5LTuIx1OylBQdKKZ9jeugs+HiqO5HormU=
    honnef.co/go/tools@v0.4.5 h1:YGD4H+SuIOOqsyoLOpZDWcieM28W47/zRO7f+9V3nvo=
    mvdan.cc/gofumpt@v0.4.0 h1:JVf4NN1mIpHogBj7ABpgOyZc65/UUOkKQFkoURsz4MM=
    mvdan.cc/xurls/v2@v2.4.0 h1:tzxjVAj+wSBmDcF6zBB7/myTy3gX9xvi8Tyr28AuQgc=
go: devel go1.22-46ea4ab Sat Dec 9 21:48:06 2023 +0000

Please let me know if you need more details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.WaitingForInfoIssue is not actionable because of missing required information, which needs to be provided.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions