Closed
Description
What version of Go are you using (go version
)?
$ go version go version go1.12.6 darwin/amd64
Does this issue reproduce with the latest release?
Yes, on 9947fec.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/tonyghita/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/tonyghita/go" GOPROXY="" GORACE="" GOROOT="/usr/local/Cellar/go/1.12.6/libexec" GOTMPDIR="" GOTOOLDIR="/usr/local/Cellar/go/1.12.6/libexec/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/gv/vdmq3_l541b_0lq_ds37xslnzgdpkw/T/go-build938807687=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Open VS Code with one test file open.
What did you expect to see?
I expected to see (any) language server functionality.
What did you see instead?
The language server hangs, repeatedly checking for the package, but claiming it does not exist. The issue happens only in this package—I'm not able to reproduce the issue elsewhere in the codebase.
2019/06/27 11:46:55 Debug serving on port: 6060
[Info - 11:46:56 AM] Build info
<truncated, available above>
[Error - 11:47:02 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:04 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:06 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:06 AM] Request textDocument/documentSymbol failed.
Message: no AST for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
Code: 0
[Error - 11:47:08 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:09 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:10 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:10 AM] Request textDocument/codeAction failed.
Message: no file information for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
Code: 0
[Error - 11:47:12 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:13 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:13 AM] Request textDocument/documentLink failed.
Message: no AST for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
Code: 0
[Error - 11:47:14 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:15 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:15 AM] Request textDocument/documentSymbol failed.
Message: no AST for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
Code: 0
[Error - 11:47:17 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:18 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
[Error - 11:47:18 AM] Request textDocument/documentSymbol failed.
Message: no AST for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
Code: 0
[Error - 11:47:19 AM] unable to check package for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go: no packages found for file:///Users/tonyghita/go/src/github.com/org/manyfiles/some_test.go
and on and on...
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
tonyghita commentedon Jun 27, 2019
Passing the
-rpc.trace
flag, I see:It seems kind of strange that the Go build information is printed in the middle of the file contents in the RPC trace.
tonyghita commentedon Jun 27, 2019
After updating
gopls
to94c5763a7c8445e53114d02cae1060df14079935
, I no longer can reproduce this issue. I think one of these commits fixed the issue:ollien commentedon Jul 7, 2019
I can reproduce this. I have
72ffa07ba3db8d09f5215feec0f89464f3028f8e
forgotools
Here is the log from the vscode debug console, both with
-rpc-trace
and withoutNot really sure how to rectify this.
stamblerre commentedon Jul 8, 2019
@ollien: Can you open a new issue for this? Your situation likely has a different root cause than the one above.