Skip to content
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/cmd/gopls: "failed to run analyses for file" on all files #32221

Closed
zikaeroh opened this issue May 24, 2019 · 1 comment
Closed

x/tools/cmd/gopls: "failed to run analyses for file" on all files #32221

zikaeroh opened this issue May 24, 2019 · 1 comment
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Milestone

Comments

@zikaeroh
Copy link
Contributor

zikaeroh commented May 24, 2019

Please answer these questions before submitting your issue. Thanks!

What did you do?

Open VSC with a Go file opened.

What did you expect to see?

No error diagnostics.

What did you see instead?

Error on my package statement:

failed to run analyses for file:///home/jake/zikaeroh/hortbot/hortbot/internal/birc/config.go: analysis skipped due to errors in package

The hover gets larger and larger as more files are opened, to the point of lagging VSC because it's so long, like (truncated):

failed to run analyses for file:///home/jake/zikaeroh/hortbot/hortbot/internal/birc/dialer_test.go: failed prerequisites: ctrlflow@&{crypto/x509 crypto/x509 [/usr/lib/go/src/crypto/x509/cert_pool.go /usr/lib/go/src/crypto/x509/pem_decrypt.go /usr/lib/go/src/crypto/x509/pkcs1.go /usr/lib/go/src/crypto/x509/pkcs8.go /usr/lib/go/src/crypto/x509/root.go /usr/lib/go/src/crypto/x509/root_linux.go /usr/lib/go/src/crypto/x509/root_unix.go /usr/lib/go/src/crypto/x509/sec1.go /usr/lib/go/src/crypto/x509/verify.go /usr/lib/go/src/crypto/x509/x509.go] [%!s(*ast.File=&{<nil> 5297780 0xc002759b60 [0xc0077c99c0 0xc0077c9b00 0xc0077df980 0xc0077229f0 0xc0077236b0 0xc00766e1b0 0xc00766e7e0 0xc00766f410 0xc007632150 0xc007632690] 0xc002629a30 [0xc0077def30 0xc0077def90 0xc0077df050] [0xc002759ca0 0xc002759cc0 0xc002759d00 0xc002759d40 0xc002759d80 0xc002759f40 0xc002759f60 0xc002759f80 0xc002759fc0 0xc002759fe0 0xc0029c0000 0xc0029c01c0 0xc0029c01e0 0xc0029c0200 0xc0029c0220 0xc0029c02e0 0xc0029c0300 0xc0029c0320 0xc0029c0340 0xc0029c0420 0xc0029c0440 0xc0029c0480 0xc0029c0640 0xc0029c0660 0xc0029c0680 0xc0029c06e0 0xc0029c0940 0xc0029c0960 0xc0029c0980 0xc0029c09e0 0xc0029c0b20 0xc0029c0e00 0xc0029c0e40 0xc0029c0f00 0xc0029c0f20 0xc0029c1000 0xc0029c1040 0xc0029c10c0 0xc0029c1140 0xc0029c12a0 0xc0029c12e0 0xc0029c1320 0xc0029c1340 0xc0029c13a0 0xc0029c13e0 0xc0029c1500 0xc0029c1580 0xc0029c1660 0xc0029c17e0 0xc0029c1820 0xc0029c1860 0xc0029c1880 0xc0029c1940 0xc0029c1b60 0xc0029c1ba0 0xc0029c1ce0 0xc0029c1d40 0xc0029c1d60 0xc0029c1ec0 0xc0029c1fa0 0xc002b4c060 0xc002b4c120 0xc002b4c220 0xc002b4c340 0xc002b4c440 0xc002b4c6e0 0xc002b4c720 0xc002b4c740 0xc002b4c7c0 0xc002b4c8a0 0xc002b4c960 0xc002b4ca20 0xc002b4cb40 0xc002b4cbe0 0xc002b4ccc0 0xc002b4ce20 0xc002b4ce60 0xc002b4ce80 0xc002b4cea0] [0xc002759b40 0xc002759c40 0xc002759e20 0xc0029c0d60 0xc0029c0ee0 0xc0029c11c0 0xc0029c1c00 0xc0029c1dc0 0xc002b4c600 0xc002b4cd60]}) 

Build info

no module information, gopls not built in module mode

I install gopls globally in GOPATH mode (with my other utilities), so no mod version info, but the hash I'm at is 38d8bcf.

If I go back one commit to 521d6ed (one commit behind), then things are fine.

Go info

go version go1.12.5 linux/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jake/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jake/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build063829290=/tmp/go-build -gno-record-gcc-switches"
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label May 24, 2019
@odeke-em odeke-em changed the title gopls: "failed to run analyses for file" on all files x/tools/cmd/gopls: "failed to run analyses for file" on all files May 24, 2019
@gopherbot gopherbot added this to the Unreleased milestone May 24, 2019
@gopherbot
Copy link

Change https://golang.org/cl/178681 mentions this issue: internal/lsp: add modfile, sumfile structs, require Go files for diagnostics

@golang golang locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls.
Projects
None yet
Development

No branches or pull requests

2 participants