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/gopls: begins to fail after some use #32545

Closed
primalmotion opened this issue Jun 11, 2019 · 50 comments
Closed

x/tools/gopls: begins to fail after some use #32545

primalmotion opened this issue Jun 11, 2019 · 50 comments
Labels
FrozenDueToAge gopls Issues related to the Go language server, gopls. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@primalmotion
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.12.3 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.3/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build905666433=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

I pulled latest after a week or two

What did you expect to see?

Gopls to work

What did you see instead?

Using VSCode, I have to reload everything for gopls to work every 2m or so. Otherwise I get random errors:

  • file X is not part of a package
  • package X does not implement Y (while it's been their forever)
  • continuously reports error in go std lib (I probably won't fix these..)
  • formatting stops working with no further message or anything

I don't do anything special and all of this was working pretty well 2 weeks ago. It has become mostly unusable for me :(

@gopherbot gopherbot added this to the Unreleased milestone Jun 11, 2019
@gopherbot gopherbot added the gopls Issues related to the Go language server, gopls. label Jun 11, 2019
@primalmotion primalmotion changed the title x/tools/gopls: since a few commit, gopls seems to break every 2m x/tools/gopls: since a few commits, gopls seems to break every 2m Jun 11, 2019
@thepudds
Copy link
Contributor

I’m sorry to hear you are encountering some issues.

Would you be able to supply the logs and other diagnostic information suggested in the troubleshooting section here:

https://github.com/golang/go/wiki/gopls

@primalmotion
Copy link
Author

Sure I will try to collect diagnostics

@primalmotion
Copy link
Author

this started to happen again (took some time today)

[Info  - 6:57:06 PM] Build info
----------
no module information, gopls not built in module mode

Go info
-------
go version go1.12.3 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.3/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build729741185=/tmp/go-build -gno-record-gcc-switches -fno-common"

[Info  - 6:57:18 PM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/squall/internal/processors/apiauthorizationpolicies.go:112:8: cannot resolve cmf
[Info  - 6:57:18 PM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/squall/internal/processors/apiauthorizationpolicies.go:112:9: cannot resolve cmf
panic: parse : empty url

goroutine 37 [running]:
golang.org/x/tools/internal/span.URI.Filename(...)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/span/uri.go:27
golang.org/x/tools/internal/span.CompareURI(0xc00022a120, 0x8c, 0x0, 0x0, 0x4051000000000000)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/span/uri.go:64 +0x2f6
golang.org/x/tools/internal/lsp/protocol.(*ColumnMapper).Range(0xc009716120, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4051000000000000, ...)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/protocol/span.go:49 +0xaa
golang.org/x/tools/internal/lsp.toProtocolDocumentSymbols(0xc009716120, 0xc0071f6000, 0x3, 0x4, 0xc0071f6000, 0x3, 0x4)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/symbols.go:35 +0x260
golang.org/x/tools/internal/lsp.(*Server).documentSymbol(0xc0001da900, 0x175af80, 0xc0097160f0, 0xc009a64020, 0xc009a64020, 0x0, 0x0, 0x0, 0xc00308a6e0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/symbols.go:23 +0x164
golang.org/x/tools/internal/lsp.(*Server).DocumentSymbol(0xc0001da900, 0x175af80, 0xc0097160f0, 0xc009a64020, 0xc009a64020, 0x0, 0x0, 0x0, 0x0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/server.go:199 +0x4d
golang.org/x/tools/internal/lsp/protocol.serverHandler.func1(0x175af80, 0xc0097160f0, 0xc00022e000, 0xc009d36dc0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/protocol/tsserver.go:335 +0x53bc
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run.func1(0xc0001bf5c0, 0xc00022e000)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:288 +0x189
created by golang.org/x/tools/internal/jsonrpc2.(*Conn).Run
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:278 +0xba
[Info  - 6:57:21 PM] Connection to server got closed. Server will restart.
[Error - 6:57:21 PM] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/main.js:876:25)
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:57:35)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:2036:42)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/main.js:127:15)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:2023:18)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/main.js:226:26)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at StreamMessageReader.fireClose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
	at Socket.listen.readable.on (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
	at Socket.emit (events.js:187:15)
	at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
[Info  - 6:57:22 PM] Build info
----------
no module information, gopls not built in module mode

Go info
-------
go version go1.12.3 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.3/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build799609456=/tmp/go-build -gno-record-gcc-switches -fno-common"

[Info  - 6:57:23 PM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/squall/internal/processors/apiauthorizationpolicies.go:112:23 : cannot find an enclosing function
[Error - 6:57:47 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 7:00:39 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 7:00:40 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 7:00:41 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 7:00:47 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:37:36 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Info  - 11:38:53 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:16: cannot resolve fmt
[Error - 11:38:54 AM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:29:4: expected selector or type assertion, found 'if' (and 1 more errors)
  Code: 0 
[Info  - 11:38:54 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:17: cannot resolve fmt
[Info  - 11:38:57 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:16: cannot resolve fmt
[Info  - 11:38:57 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:17: cannot resolve fmt
[Info  - 11:38:57 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:21: cannot resolve fmt
[Info  - 11:38:57 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:22: cannot resolve fmt
[Info  - 11:38:59 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:18: cannot resolve fmt
[Info  - 11:38:59 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:21: cannot resolve fmt
[Info  - 11:38:59 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:22: cannot resolve fmt
[Info  - 11:38:59 AM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:23: cannot resolve fmt
[Info  - 11:38:59 AM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:24 : cannot get type for Fun *ast.SelectorExpr (&{fmt Println})
[Info  - 11:39:05 AM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go:27:32 : cannot get type for Fun *ast.SelectorExpr (&{fmt Println})
[Error - 11:39:50 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:39:51 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:39:52 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:40:10 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:40:12 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:40:13 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:40:59 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:41:27 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:41:35 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:41:35 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:41:40 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:04 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:12 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:12 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:23 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:28 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:43 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:42:44 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:26 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:36 AM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:36 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:43:36 AM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:00 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:01 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:01 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:02 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:08 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:08 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:09 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:10 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:10 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:45:11 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:46:28 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:46:29 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:46:33 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:49:07 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:49:08 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:50:01 AM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 11:50:10 AM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 11:52:41 AM] Request textDocument/hover failed.
  Message: no object for ident crudcore
  Code: 0 
[Error - 12:01:43 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:01:55 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:02:35 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:02:45 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:03:18 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:03:33 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:03:33 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:03:45 PM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:20 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:26 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:28 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:28 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:29 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:36 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Info  - 12:05:37 PM] no completions found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go:164:6: this is a definition, of var _ net.Error
[Error - 12:05:39 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:05:54 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:03 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Info  - 12:06:11 PM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go:164:84 : cannot find an enclosing function
unable to parse defer or go from *ast.BadStmt: no defer or go statement found
[Error - 12:06:24 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:28 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:34 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:35 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:38 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:39 PM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 12:06:43 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:07:01 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:3: expected ';', found ','
  Code: 0 
[Error - 12:07:02 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:3: expected ';', found ','
  Code: 0 
[Error - 12:07:10 PM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Error - 12:07:14 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
unable to parse defer or go from *ast.BadStmt: no defer or go statement found
[Error - 12:07:30 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:2: expected selector or type assertion, found '}' (and 1 more errors)
  Code: 0 
panic: parse : empty url

goroutine 37 [running]:
golang.org/x/tools/internal/span.URI.Filename(...)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/span/uri.go:27
golang.org/x/tools/internal/span.CompareURI(0xc007b57180, 0x6f, 0x0, 0x0, 0x4056000000000000)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/span/uri.go:64 +0x2f6
golang.org/x/tools/internal/lsp/protocol.(*ColumnMapper).Range(0xc01fe691d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4056000000000000, ...)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/protocol/span.go:49 +0xaa
golang.org/x/tools/internal/lsp.toProtocolDocumentSymbols(0xc01fe691d0, 0xc01ca43200, 0x7, 0x8, 0xc01ca43200, 0x7, 0x8)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/symbols.go:35 +0x260
golang.org/x/tools/internal/lsp.(*Server).documentSymbol(0xc00010ec00, 0x175af80, 0xc01fe691a0, 0xc01fedd580, 0xc01fedd580, 0x0, 0x0, 0x0, 0xc026236d20)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/symbols.go:23 +0x164
golang.org/x/tools/internal/lsp.(*Server).DocumentSymbol(0xc00010ec00, 0x175af80, 0xc01fe691a0, 0xc01fedd580, 0xc01fedd580, 0x0, 0x0, 0xc01fe6ea80, 0x0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/server.go:199 +0x4d
golang.org/x/tools/internal/lsp/protocol.serverHandler.func1(0x175af80, 0xc01fe691a0, 0xc00018a3f0, 0xc01fe6eb40)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/lsp/protocol/tsserver.go:335 +0x53bc
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run.func1(0xc0000bfe00, 0xc00018a3f0)
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:288 +0x189
created by golang.org/x/tools/internal/jsonrpc2.(*Conn).Run
	/Users/tonio/Documents/Aporeto/workspace/code/go/src/golang.org/x/tools/internal/jsonrpc2/jsonrpc2.go:278 +0xba
[Info  - 12:07:30 PM] Connection to server got closed. Server will restart.
[Error - 12:07:30 PM] Request textDocument/documentSymbol failed.
Error: Connection got disposed.
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/main.js:876:25)
	at Object.dispose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:57:35)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:2036:42)
	at LanguageClient.handleConnectionClosed (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/main.js:127:15)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-languageclient/lib/client.js:2023:18)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at closeHandler (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/main.js:226:26)
	at CallbackList.invoke (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:62:39)
	at Emitter.fire (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/events.js:120:36)
	at StreamMessageReader.fireClose (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/messageReader.js:111:27)
	at Socket.listen.readable.on (/Users/tonio/.vscode/extensions/ms-vscode.go-0.10.2/node_modules/vscode-jsonrpc/lib/messageReader.js:151:46)
	at Socket.emit (events.js:187:15)
	at Pipe.Socket._destroy._handle.close [as _onclose] (net.js:596:12)
[Info  - 12:07:31 PM] Build info
----------
version v0.0.1-20190607+alpha, built in $GOPATH mode
Go info
-------
go version go1.12.3 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.3/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build581340126=/tmp/go-build -gno-record-gcc-switches -fno-common"

unable to parse defer or go from *ast.BadStmt: no defer or go statement found
[Error - 12:07:35 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:2: expected selector or type assertion, found '}' (and 1 more errors)
  Code: 0 
unable to parse defer or go from *ast.BadStmt: no defer or go statement found
[Error - 12:07:36 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:2: expected selector or type assertion, found '}' (and 1 more errors)
  Code: 0 
[Error - 12:07:36 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:2: expected selector or type assertion, found '}' (and 1 more errors)
  Code: 0 
[Error - 12:07:41 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:123:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:50 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:52 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:53 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:55 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:55 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Info  - 12:07:56 PM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:121:30 : cannot find signature for Fun *ast.Ident (namespaceZoningInfo)
[Error - 12:07:56 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:57 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:57 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:07:59 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:08:00 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:74: missing ',' in argument list (and 10 more errors)
  Code: 0 
[Error - 12:08:01 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:124:68: expected operand, found ')' (and 10 more errors)
  Code: 0 
[Error - 12:08:02 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:02 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:04 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:04 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:05 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:05 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:06 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:11 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:11 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:14 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:132:13: illegal character U+0024 '$' (and 5 more errors)
  Code: 0 
[Error - 12:08:15 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:132:13: illegal character U+0024 '$' (and 5 more errors)
  Code: 0 
[Error - 12:08:16 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:132:13: illegal character U+0024 '$' (and 5 more errors)
  Code: 0 
[Error - 12:08:17 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:132:13: expected operand, found ':' (and 5 more errors)
  Code: 0 
[Error - 12:08:17 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:132:13: illegal character U+0024 '$' (and 5 more errors)
  Code: 0 
[Error - 12:08:18 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:10: missing ',' in composite literal
  Code: 0 
[Error - 12:08:19 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:10: missing ',' in composite literal
  Code: 0 
[Error - 12:08:19 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:10: missing ',' in composite literal
  Code: 0 
[Error - 12:08:20 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:10: missing ',' in composite literal
  Code: 0 
[Error - 12:08:21 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:4: missing ',' in composite literal (and 5 more errors)
  Code: 0 
[Error - 12:08:23 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:4: missing ',' in composite literal (and 5 more errors)
  Code: 0 
[Error - 12:08:26 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:28 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:5: expected expression (and 5 more errors)
  Code: 0 
[Error - 12:08:28 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:133:5: expected expression (and 5 more errors)
  Code: 0 
[Error - 12:08:45 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:46 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:08:47 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:01 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:60: expected operand, found '}' (and 5 more errors)
  Code: 0 
[Error - 12:09:11 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:64: expected selector or type assertion, found ""
  Code: 0 
[Error - 12:09:12 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:71: missing ',' in composite literal
  Code: 0 
[Error - 12:09:12 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:71: missing ',' in composite literal
  Code: 0 
[Error - 12:09:13 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:134:71: missing ',' in composite literal
  Code: 0 
[Error - 12:09:30 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:42 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:43 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:46 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:46 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:09:49 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:11:12 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:11:18 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:11:20 PM] Request textDocument/definition failed.
  Message: no identifier found
  Code: 0 
[Info  - 12:11:23 PM] no signature help for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:129:17 : cannot find an enclosing function
[Error - 12:11:24 PM] Request textDocument/codeAction failed.
  Message: /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go:130:18: expected operand, found ')' (and 1 more errors)
  Code: 0 
[Error - 12:16:52 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:17:45 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:18:00 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:18:09 PM] Request textDocument/documentHighlight failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:18:23 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}: no such file or directory
  Code: 0 
[Error - 12:18:23 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:18:23 PM] Request textDocument/codeAction failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:18:30 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:18:31 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:18:32 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:18:32 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:18:32 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D
  Code: 0 
[Error - 12:31:42 PM] Request textDocument/documentHighlight failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:31:42 PM] Request textDocument/codeAction failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:31:45 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:46 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:46 PM] Request textDocument/hover failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D
  Code: 0 
[Error - 12:31:47 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:48 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:48 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:49 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:49 PM] Request textDocument/hover failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D
  Code: 0 
[Error - 12:31:50 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:50 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":"HEAD"}
[Error - 12:31:50 PM] Request textDocument/hover failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%3F%7B%22path%22:%22/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go%22,%22ref%22:%22HEAD%22%7D
  Code: 0 
[Error - 12:31:50 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:31:50 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/sharding/nszoning.go","ref":""}: no such file or directory
  Code: 0 
[Error - 12:40:35 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:40:35 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
unable to parse defer or go from *ast.BadStmt: no defer or go statement found
unable to parse defer or go from *ast.BadStmt: no defer or go statement found
[Error - 12:41:03 PM] Request textDocument/documentHighlight failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:03 PM] Request textDocument/definition failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:06 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:07 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:10 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:10 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/remoteprocessor.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:16 PM] Request textDocument/documentLink failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 12:41:17 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Error - 12:41:17 PM] Request textDocument/hover failed.
  Message: open /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/git:/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go?{"path":"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/internal/crudcore/hooks.go","ref":"~"}: no such file or directory
  Code: 0 
[Error - 1:02:01 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 
[Info  - 1:32:42 PM] Connection to server got closed. Server will restart.
[Info  - 1:32:42 PM] Build info
----------
version v0.0.1-20190607+alpha, built in $GOPATH mode
Go info
-------
go version go1.12.3 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12.3/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12.3/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build737829392=/tmp/go-build -gno-record-gcc-switches -fno-common"

[Error - 2:17:57 PM] Request textDocument/hover failed.
  Message: no identifier found
  Code: 0 

@primalmotion
Copy link
Author

and this is what shows my error window

Screen Shot 2019-06-11 at 14 20 57

@ianthehat
Copy link

Looks like you were hitting the empty url issue that was fixed earlier today in https://go-review.googlesource.com/c/tools/+/181677
The rest of the log looks mostly normal. Could you try updating to tip and seeing if it got better?

@primalmotion
Copy link
Author

I was already on the tip..

I've reloaded all my VSCode windows. I'll report if (when) this happens again

@primalmotion
Copy link
Author

happened again. Nothing interesting in gopls output but this

Screen Shot 2019-06-11 at 16 51 17

and when I try to click on one of the errors:

Screen Shot 2019-06-11 at 16 52 04

@primalmotion
Copy link
Author

primalmotion commented Jun 12, 2019

I'm not sure but this seems to happen when there are file movements (git pull, switch branch, renaming a file etc). But I'm not 100% sure

@stamblerre
Copy link
Contributor

When you switch branches, you will have to reload your instance of VSCode. We don't yet support watching files on disk, but you can track our work on that on #31553.

Renaming a file will likely cause errors to appear though. LSP only tells us if a file has been closed or opened, so there is no clear way for us to detect that. Thanks for reporting, filed #32562.

@primalmotion
Copy link
Author

@stamblerre ah! that may be the cause. I was working on a huge refactoring and moved a tons of files again and again, which would explain these issues then. I will follow the 2 tickets mentioned above

Thanks!

@stamblerre
Copy link
Contributor

Great, thank you for the report! Closing this issue then. Feel free to reopen if something else comes up.

@primalmotion
Copy link
Author

primalmotion commented Jun 20, 2019

since last master, it's back. I have to restart gopls every 2m. It randomly stops working and says

[Error - 12:43:45 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/gogole/internal/indexer/indexer.go: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/gogole/internal/indexer/indexer.go
[Error - 12:43:45 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/gogole/internal/indexer/indexer.go: loadParseTypeCheck: no package found for /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/gogole/internal/indexer/indexer.go
[Error - 12:43:45 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/backend/srv/gogole/internal/indexer/indexer.go
  Code: 0 

@primalmotion
Copy link
Author

this time I'm not moving any files around

@stamblerre
Copy link
Contributor

@primalmotion: Can you sync to the latest version of gopls (go get -u golang.org/x/tools/gopls@master) and confirm if you still see these issues?

@primalmotion
Copy link
Author

primalmotion commented Jul 1, 2019

This is still happening. I still have to restart gopls every 2 or 3 minutes as it just stops working completely

@primalmotion
Copy link
Author

either I end up with an error at the top that says the file is not part of any package (I don't move files) or just plain nothing

@stamblerre
Copy link
Contributor

Are you able to share the gopls logs for this case?

@primalmotion
Copy link
Author

Sure, I will next time it happens

@primalmotion
Copy link
Author

version v0.1.1-cmd.gopls, built in $GOPATH mode

Go info
-------
go version go1.12.6 darwin/amd64

GOARCH="amd64"
GOBIN="/Users/tonio/Documents/Aporeto/workspace/code/go/bin"
GOCACHE="/Users/tonio/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/tonio/Documents/Aporeto/workspace/code/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/f1/_f3ghgmj7l352ypkbkjkxd7w0000gn/T/go-build201162820=/tmp/go-build -gno-record-gcc-switches -fno-common"

[Error - 1:06:04 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters.go
[Error - 1:06:05 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 1:06:05 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:10 PM] Request textDocument/documentSymbol failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 
[Error - 6:02:11 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:11 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:11 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:11 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 
[Error - 6:02:12 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:12 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:12 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:12 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 
[Error - 6:02:42 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:42 PM] unable to check package for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go: no packages found for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
[Error - 6:02:42 PM] Request textDocument/hover failed.
  Message: no AST for file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go
  Code: 0 

The error displayed is

file:///Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/converters_test.go is not part of a package

@stamblerre
Copy link
Contributor

Does gopls work in this package and then stop working, or does this error show up immediately?

@primalmotion
Copy link
Author

It works a bit. Then as I write it find some syntax errors. When I'm done typing, then gopls stays stuck.

@stamblerre
Copy link
Contributor

Hm, from the logs it seems like it breaks immediately. What is the output of go list -e -json -compiled -test /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/? Just to confirm, you are not using modules, correct?

@stamblerre stamblerre reopened this Jul 2, 2019
@primalmotion
Copy link
Author

I'm not using go modules (I tried, go modules are completely missing the point and are a plain nightmare, but that's another discussion...)

go list -e -json -compiled -test /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/
{
	"Dir": "/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit",
	"ImportPath": "go.aporeto.io/apoctl/internal/audit",
	"Name": "audit",
	"Target": "/Users/tonio/Documents/Aporeto/workspace/code/go/pkg/darwin_amd64/go.aporeto.io/apoctl/internal/audit.a",
	"Root": "/Users/tonio/Documents/Aporeto/workspace/code/go",
	"Match": [
		"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit"
	],
	"Stale": true,
	"StaleReason": "stale dependency: github.com/araddon/dateparse",
	"GoFiles": [
		"converters.go",
		"import.go",
		"main.go"
	],
	"CompiledGoFiles": [
		"converters.go",
		"import.go",
		"main.go"
	],
	"Imports": [
		"bufio",
		"fmt",
		"github.com/elastic/go-libaudit/rule",
		"github.com/elastic/go-libaudit/rule/flags",
		"github.com/spf13/cobra",
		"github.com/spf13/viper",
		"go.aporeto.io/apoctl/internal/common",
		"go.aporeto.io/apoctl/internal/constants",
		"go.aporeto.io/gaia",
		"go.aporeto.io/gaia/types",
		"go.aporeto.io/manipulate",
		"go.aporeto.io/manipulate/maniphttp",
		"go.uber.org/zap",
		"os",
		"path/filepath",
		"strings"
	],
	"Deps": [
		"bufio",
		"bytes",
		"cloud.google.com/go/compute/metadata",
		"compress/flate",
		"compress/gzip",
		"container/list",
		"context",
		"crypto",
		"crypto/aes",
		"crypto/cipher",
		"crypto/des",
		"crypto/dsa",
		"crypto/ecdsa",
		"crypto/elliptic",
		"crypto/hmac",
		"crypto/internal/randutil",
		"crypto/internal/subtle",
		"crypto/md5",
		"crypto/rand",
		"crypto/rc4",
		"crypto/rsa",
		"crypto/sha1",
		"crypto/sha256",
		"crypto/sha512",
		"crypto/subtle",
		"crypto/tls",
		"crypto/x509",
		"crypto/x509/pkix",
		"database/sql/driver",
		"encoding",
		"encoding/asn1",
		"encoding/base64",
		"encoding/binary",
		"encoding/csv",
		"encoding/gob",
		"encoding/hex",
		"encoding/json",
		"encoding/pem",
		"errors",
		"flag",
		"fmt",
		"github.com/araddon/dateparse",
		"github.com/dgrijalva/jwt-go",
		"github.com/elastic/go-libaudit/auparse",
		"github.com/elastic/go-libaudit/rule",
		"github.com/elastic/go-libaudit/rule/flags",
		"github.com/fatih/color",
		"github.com/fatih/color/vendor/github.com/mattn/go-colorable",
		"github.com/fatih/color/vendor/github.com/mattn/go-isatty",
		"github.com/fsnotify/fsnotify",
		"github.com/ghodss/yaml",
		"github.com/gofrs/uuid",
		"github.com/gorilla/websocket",
		"github.com/hashicorp/hcl",
		"github.com/hashicorp/hcl/hcl/ast",
		"github.com/hashicorp/hcl/hcl/parser",
		"github.com/hashicorp/hcl/hcl/printer",
		"github.com/hashicorp/hcl/hcl/scanner",
		"github.com/hashicorp/hcl/hcl/strconv",
		"github.com/hashicorp/hcl/hcl/token",
		"github.com/hashicorp/hcl/json/parser",
		"github.com/hashicorp/hcl/json/scanner",
		"github.com/hashicorp/hcl/json/token",
		"github.com/hokaccha/go-prettyjson",
		"github.com/magiconair/properties",
		"github.com/mattn/go-runewidth",
		"github.com/mitchellh/copystructure",
		"github.com/mitchellh/go-homedir",
		"github.com/mitchellh/mapstructure",
		"github.com/mitchellh/reflectwalk",
		"github.com/olekukonko/tablewriter",
		"github.com/opentracing/opentracing-go",
		"github.com/opentracing/opentracing-go/log",
		"github.com/pelletier/go-toml",
		"github.com/pkg/errors",
		"github.com/spf13/afero",
		"github.com/spf13/afero/mem",
		"github.com/spf13/cast",
		"github.com/spf13/cobra",
		"github.com/spf13/jwalterweatherman",
		"github.com/spf13/pflag",
		"github.com/spf13/viper",
		"github.com/ugorji/go/codec",
		"go.aporeto.io/addedeffect/tokenutils",
		"go.aporeto.io/apoctl/internal/common",
		"go.aporeto.io/apoctl/internal/constants",
		"go.aporeto.io/elemental",
		"go.aporeto.io/gaia",
		"go.aporeto.io/gaia/constants",
		"go.aporeto.io/gaia/portutils",
		"go.aporeto.io/gaia/protocols",
		"go.aporeto.io/gaia/types",
		"go.aporeto.io/manipulate",
		"go.aporeto.io/manipulate/internal/backoff",
		"go.aporeto.io/manipulate/internal/idempotency",
		"go.aporeto.io/manipulate/internal/push",
		"go.aporeto.io/manipulate/internal/snip",
		"go.aporeto.io/manipulate/internal/tracing",
		"go.aporeto.io/manipulate/maniphttp",
		"go.aporeto.io/manipulate/maniphttp/internal/compiler",
		"go.aporeto.io/midgard-lib/client",
		"go.aporeto.io/midgard-lib/ldaputils",
		"go.aporeto.io/midgard-lib/tokenmanager/providers",
		"go.aporeto.io/tg/tglib",
		"go.aporeto.io/underwater/core",
		"go.aporeto.io/wsc",
		"go.uber.org/atomic",
		"go.uber.org/multierr",
		"go.uber.org/zap",
		"go.uber.org/zap/buffer",
		"go.uber.org/zap/internal/bufferpool",
		"go.uber.org/zap/internal/color",
		"go.uber.org/zap/internal/exit",
		"go.uber.org/zap/zapcore",
		"golang.org/x/sys/unix",
		"golang.org/x/text/transform",
		"golang.org/x/text/unicode/norm",
		"gopkg.in/yaml.v2",
		"hash",
		"hash/crc32",
		"html",
		"html/template",
		"internal/bytealg",
		"internal/cpu",
		"internal/fmtsort",
		"internal/nettrace",
		"internal/poll",
		"internal/race",
		"internal/singleflight",
		"internal/syscall/unix",
		"internal/testlog",
		"internal/x/crypto/chacha20poly1305",
		"internal/x/crypto/cryptobyte",
		"internal/x/crypto/cryptobyte/asn1",
		"internal/x/crypto/curve25519",
		"internal/x/crypto/hkdf",
		"internal/x/crypto/internal/chacha20",
		"internal/x/crypto/poly1305",
		"internal/x/net/dns/dnsmessage",
		"internal/x/net/http/httpguts",
		"internal/x/net/http/httpproxy",
		"internal/x/net/http2/hpack",
		"internal/x/net/idna",
		"internal/x/net/route",
		"internal/x/text/secure/bidirule",
		"internal/x/text/transform",
		"internal/x/text/unicode/bidi",
		"internal/x/text/unicode/norm",
		"io",
		"io/ioutil",
		"log",
		"math",
		"math/big",
		"math/bits",
		"math/rand",
		"mime",
		"mime/multipart",
		"mime/quotedprintable",
		"net",
		"net/http",
		"net/http/httptrace",
		"net/http/internal",
		"net/rpc",
		"net/textproto",
		"net/url",
		"os",
		"os/exec",
		"os/user",
		"path",
		"path/filepath",
		"reflect",
		"regexp",
		"regexp/syntax",
		"runtime",
		"runtime/cgo",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"sort",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"syscall",
		"text/tabwriter",
		"text/template",
		"text/template/parse",
		"time",
		"unicode",
		"unicode/utf16",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"converters_test.go"
	],
	"TestImports": [
		"github.com/elastic/go-libaudit/rule",
		"github.com/smartystreets/goconvey/convey",
		"go.aporeto.io/gaia/types",
		"testing"
	]
}
{
	"Dir": "/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit",
	"ImportPath": "go.aporeto.io/apoctl/internal/audit.test",
	"Name": "main",
	"Root": "/Users/tonio/Documents/Aporeto/workspace/code/go",
	"Stale": true,
	"StaleReason": "stale dependency: github.com/araddon/dateparse",
	"GoFiles": [
		"/Users/tonio/Library/Caches/go-build/f1/f17357deaff80666d204f55e4546bb04f99a472d3bbf6b5c6ed3026e581af37c-d"
	],
	"CompiledGoFiles": [
		"/Users/tonio/Library/Caches/go-build/f1/f17357deaff80666d204f55e4546bb04f99a472d3bbf6b5c6ed3026e581af37c-d"
	],
	"Imports": [
		"go.aporeto.io/apoctl/internal/audit [go.aporeto.io/apoctl/internal/audit.test]",
		"os",
		"testing",
		"testing/internal/testdeps"
	],
	"ImportMap": {
		"go.aporeto.io/apoctl/internal/audit": "go.aporeto.io/apoctl/internal/audit [go.aporeto.io/apoctl/internal/audit.test]"
	},
	"Deps": [
		"bufio",
		"bytes",
		"cloud.google.com/go/compute/metadata",
		"compress/flate",
		"compress/gzip",
		"container/list",
		"context",
		"crypto",
		"crypto/aes",
		"crypto/cipher",
		"crypto/des",
		"crypto/dsa",
		"crypto/ecdsa",
		"crypto/elliptic",
		"crypto/hmac",
		"crypto/internal/randutil",
		"crypto/internal/subtle",
		"crypto/md5",
		"crypto/rand",
		"crypto/rc4",
		"crypto/rsa",
		"crypto/sha1",
		"crypto/sha256",
		"crypto/sha512",
		"crypto/subtle",
		"crypto/tls",
		"crypto/x509",
		"crypto/x509/pkix",
		"database/sql/driver",
		"encoding",
		"encoding/asn1",
		"encoding/base64",
		"encoding/binary",
		"encoding/csv",
		"encoding/gob",
		"encoding/hex",
		"encoding/json",
		"encoding/pem",
		"errors",
		"flag",
		"fmt",
		"github.com/araddon/dateparse",
		"github.com/dgrijalva/jwt-go",
		"github.com/elastic/go-libaudit/auparse",
		"github.com/elastic/go-libaudit/rule",
		"github.com/elastic/go-libaudit/rule/flags",
		"github.com/fatih/color",
		"github.com/fatih/color/vendor/github.com/mattn/go-colorable",
		"github.com/fatih/color/vendor/github.com/mattn/go-isatty",
		"github.com/fsnotify/fsnotify",
		"github.com/ghodss/yaml",
		"github.com/gofrs/uuid",
		"github.com/gorilla/websocket",
		"github.com/hashicorp/hcl",
		"github.com/hashicorp/hcl/hcl/ast",
		"github.com/hashicorp/hcl/hcl/parser",
		"github.com/hashicorp/hcl/hcl/printer",
		"github.com/hashicorp/hcl/hcl/scanner",
		"github.com/hashicorp/hcl/hcl/strconv",
		"github.com/hashicorp/hcl/hcl/token",
		"github.com/hashicorp/hcl/json/parser",
		"github.com/hashicorp/hcl/json/scanner",
		"github.com/hashicorp/hcl/json/token",
		"github.com/hokaccha/go-prettyjson",
		"github.com/jtolds/gls",
		"github.com/magiconair/properties",
		"github.com/mattn/go-runewidth",
		"github.com/mitchellh/copystructure",
		"github.com/mitchellh/go-homedir",
		"github.com/mitchellh/mapstructure",
		"github.com/mitchellh/reflectwalk",
		"github.com/olekukonko/tablewriter",
		"github.com/opentracing/opentracing-go",
		"github.com/opentracing/opentracing-go/log",
		"github.com/pelletier/go-toml",
		"github.com/pkg/errors",
		"github.com/smartystreets/assertions",
		"github.com/smartystreets/assertions/internal/go-diff/diffmatchpatch",
		"github.com/smartystreets/assertions/internal/go-render/render",
		"github.com/smartystreets/assertions/internal/oglematchers",
		"github.com/smartystreets/goconvey/convey",
		"github.com/smartystreets/goconvey/convey/gotest",
		"github.com/smartystreets/goconvey/convey/reporting",
		"github.com/spf13/afero",
		"github.com/spf13/afero/mem",
		"github.com/spf13/cast",
		"github.com/spf13/cobra",
		"github.com/spf13/jwalterweatherman",
		"github.com/spf13/pflag",
		"github.com/spf13/viper",
		"github.com/ugorji/go/codec",
		"go.aporeto.io/addedeffect/tokenutils",
		"go.aporeto.io/apoctl/internal/audit [go.aporeto.io/apoctl/internal/audit.test]",
		"go.aporeto.io/apoctl/internal/common",
		"go.aporeto.io/apoctl/internal/constants",
		"go.aporeto.io/elemental",
		"go.aporeto.io/gaia",
		"go.aporeto.io/gaia/constants",
		"go.aporeto.io/gaia/portutils",
		"go.aporeto.io/gaia/protocols",
		"go.aporeto.io/gaia/types",
		"go.aporeto.io/manipulate",
		"go.aporeto.io/manipulate/internal/backoff",
		"go.aporeto.io/manipulate/internal/idempotency",
		"go.aporeto.io/manipulate/internal/push",
		"go.aporeto.io/manipulate/internal/snip",
		"go.aporeto.io/manipulate/internal/tracing",
		"go.aporeto.io/manipulate/maniphttp",
		"go.aporeto.io/manipulate/maniphttp/internal/compiler",
		"go.aporeto.io/midgard-lib/client",
		"go.aporeto.io/midgard-lib/ldaputils",
		"go.aporeto.io/midgard-lib/tokenmanager/providers",
		"go.aporeto.io/tg/tglib",
		"go.aporeto.io/underwater/core",
		"go.aporeto.io/wsc",
		"go.uber.org/atomic",
		"go.uber.org/multierr",
		"go.uber.org/zap",
		"go.uber.org/zap/buffer",
		"go.uber.org/zap/internal/bufferpool",
		"go.uber.org/zap/internal/color",
		"go.uber.org/zap/internal/exit",
		"go.uber.org/zap/zapcore",
		"golang.org/x/sys/unix",
		"golang.org/x/text/transform",
		"golang.org/x/text/unicode/norm",
		"gopkg.in/yaml.v2",
		"hash",
		"hash/crc32",
		"html",
		"html/template",
		"internal/bytealg",
		"internal/cpu",
		"internal/fmtsort",
		"internal/nettrace",
		"internal/poll",
		"internal/race",
		"internal/singleflight",
		"internal/syscall/unix",
		"internal/testlog",
		"internal/x/crypto/chacha20poly1305",
		"internal/x/crypto/cryptobyte",
		"internal/x/crypto/cryptobyte/asn1",
		"internal/x/crypto/curve25519",
		"internal/x/crypto/hkdf",
		"internal/x/crypto/internal/chacha20",
		"internal/x/crypto/poly1305",
		"internal/x/net/dns/dnsmessage",
		"internal/x/net/http/httpguts",
		"internal/x/net/http/httpproxy",
		"internal/x/net/http2/hpack",
		"internal/x/net/idna",
		"internal/x/net/route",
		"internal/x/text/secure/bidirule",
		"internal/x/text/transform",
		"internal/x/text/unicode/bidi",
		"internal/x/text/unicode/norm",
		"io",
		"io/ioutil",
		"log",
		"math",
		"math/big",
		"math/bits",
		"math/rand",
		"mime",
		"mime/multipart",
		"mime/quotedprintable",
		"net",
		"net/http",
		"net/http/httptrace",
		"net/http/internal",
		"net/rpc",
		"net/textproto",
		"net/url",
		"os",
		"os/exec",
		"os/user",
		"path",
		"path/filepath",
		"reflect",
		"regexp",
		"regexp/syntax",
		"runtime",
		"runtime/cgo",
		"runtime/debug",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"runtime/pprof",
		"runtime/trace",
		"sort",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"syscall",
		"testing",
		"testing/internal/testdeps",
		"text/tabwriter",
		"text/template",
		"text/template/parse",
		"time",
		"unicode",
		"unicode/utf16",
		"unicode/utf8",
		"unsafe"
	]
}
{
	"Dir": "/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit",
	"ImportPath": "go.aporeto.io/apoctl/internal/audit [go.aporeto.io/apoctl/internal/audit.test]",
	"Name": "audit",
	"Root": "/Users/tonio/Documents/Aporeto/workspace/code/go",
	"ForTest": "go.aporeto.io/apoctl/internal/audit",
	"Match": [
		"/Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit"
	],
	"Stale": true,
	"StaleReason": "stale dependency: github.com/araddon/dateparse",
	"GoFiles": [
		"converters.go",
		"import.go",
		"main.go",
		"converters_test.go"
	],
	"CompiledGoFiles": [
		"converters.go",
		"import.go",
		"main.go",
		"converters_test.go"
	],
	"Imports": [
		"github.com/elastic/go-libaudit/rule",
		"github.com/smartystreets/goconvey/convey",
		"go.aporeto.io/gaia/types",
		"testing",
		"bufio",
		"fmt",
		"github.com/elastic/go-libaudit/rule",
		"github.com/elastic/go-libaudit/rule/flags",
		"github.com/spf13/cobra",
		"github.com/spf13/viper",
		"go.aporeto.io/apoctl/internal/common",
		"go.aporeto.io/apoctl/internal/constants",
		"go.aporeto.io/gaia",
		"go.aporeto.io/gaia/types",
		"go.aporeto.io/manipulate",
		"go.aporeto.io/manipulate/maniphttp",
		"go.uber.org/zap",
		"os",
		"path/filepath",
		"strings"
	],
	"Deps": [
		"bufio",
		"bytes",
		"cloud.google.com/go/compute/metadata",
		"compress/flate",
		"compress/gzip",
		"container/list",
		"context",
		"crypto",
		"crypto/aes",
		"crypto/cipher",
		"crypto/des",
		"crypto/dsa",
		"crypto/ecdsa",
		"crypto/elliptic",
		"crypto/hmac",
		"crypto/internal/randutil",
		"crypto/internal/subtle",
		"crypto/md5",
		"crypto/rand",
		"crypto/rc4",
		"crypto/rsa",
		"crypto/sha1",
		"crypto/sha256",
		"crypto/sha512",
		"crypto/subtle",
		"crypto/tls",
		"crypto/x509",
		"crypto/x509/pkix",
		"database/sql/driver",
		"encoding",
		"encoding/asn1",
		"encoding/base64",
		"encoding/binary",
		"encoding/csv",
		"encoding/gob",
		"encoding/hex",
		"encoding/json",
		"encoding/pem",
		"errors",
		"flag",
		"fmt",
		"github.com/araddon/dateparse",
		"github.com/dgrijalva/jwt-go",
		"github.com/elastic/go-libaudit/auparse",
		"github.com/elastic/go-libaudit/rule",
		"github.com/elastic/go-libaudit/rule/flags",
		"github.com/fatih/color",
		"github.com/fatih/color/vendor/github.com/mattn/go-colorable",
		"github.com/fatih/color/vendor/github.com/mattn/go-isatty",
		"github.com/fsnotify/fsnotify",
		"github.com/ghodss/yaml",
		"github.com/gofrs/uuid",
		"github.com/gorilla/websocket",
		"github.com/hashicorp/hcl",
		"github.com/hashicorp/hcl/hcl/ast",
		"github.com/hashicorp/hcl/hcl/parser",
		"github.com/hashicorp/hcl/hcl/printer",
		"github.com/hashicorp/hcl/hcl/scanner",
		"github.com/hashicorp/hcl/hcl/strconv",
		"github.com/hashicorp/hcl/hcl/token",
		"github.com/hashicorp/hcl/json/parser",
		"github.com/hashicorp/hcl/json/scanner",
		"github.com/hashicorp/hcl/json/token",
		"github.com/hokaccha/go-prettyjson",
		"github.com/jtolds/gls",
		"github.com/magiconair/properties",
		"github.com/mattn/go-runewidth",
		"github.com/mitchellh/copystructure",
		"github.com/mitchellh/go-homedir",
		"github.com/mitchellh/mapstructure",
		"github.com/mitchellh/reflectwalk",
		"github.com/olekukonko/tablewriter",
		"github.com/opentracing/opentracing-go",
		"github.com/opentracing/opentracing-go/log",
		"github.com/pelletier/go-toml",
		"github.com/pkg/errors",
		"github.com/smartystreets/assertions",
		"github.com/smartystreets/assertions/internal/go-diff/diffmatchpatch",
		"github.com/smartystreets/assertions/internal/go-render/render",
		"github.com/smartystreets/assertions/internal/oglematchers",
		"github.com/smartystreets/goconvey/convey",
		"github.com/smartystreets/goconvey/convey/gotest",
		"github.com/smartystreets/goconvey/convey/reporting",
		"github.com/spf13/afero",
		"github.com/spf13/afero/mem",
		"github.com/spf13/cast",
		"github.com/spf13/cobra",
		"github.com/spf13/jwalterweatherman",
		"github.com/spf13/pflag",
		"github.com/spf13/viper",
		"github.com/ugorji/go/codec",
		"go.aporeto.io/addedeffect/tokenutils",
		"go.aporeto.io/apoctl/internal/common",
		"go.aporeto.io/apoctl/internal/constants",
		"go.aporeto.io/elemental",
		"go.aporeto.io/gaia",
		"go.aporeto.io/gaia/constants",
		"go.aporeto.io/gaia/portutils",
		"go.aporeto.io/gaia/protocols",
		"go.aporeto.io/gaia/types",
		"go.aporeto.io/manipulate",
		"go.aporeto.io/manipulate/internal/backoff",
		"go.aporeto.io/manipulate/internal/idempotency",
		"go.aporeto.io/manipulate/internal/push",
		"go.aporeto.io/manipulate/internal/snip",
		"go.aporeto.io/manipulate/internal/tracing",
		"go.aporeto.io/manipulate/maniphttp",
		"go.aporeto.io/manipulate/maniphttp/internal/compiler",
		"go.aporeto.io/midgard-lib/client",
		"go.aporeto.io/midgard-lib/ldaputils",
		"go.aporeto.io/midgard-lib/tokenmanager/providers",
		"go.aporeto.io/tg/tglib",
		"go.aporeto.io/underwater/core",
		"go.aporeto.io/wsc",
		"go.uber.org/atomic",
		"go.uber.org/multierr",
		"go.uber.org/zap",
		"go.uber.org/zap/buffer",
		"go.uber.org/zap/internal/bufferpool",
		"go.uber.org/zap/internal/color",
		"go.uber.org/zap/internal/exit",
		"go.uber.org/zap/zapcore",
		"golang.org/x/sys/unix",
		"golang.org/x/text/transform",
		"golang.org/x/text/unicode/norm",
		"gopkg.in/yaml.v2",
		"hash",
		"hash/crc32",
		"html",
		"html/template",
		"internal/bytealg",
		"internal/cpu",
		"internal/fmtsort",
		"internal/nettrace",
		"internal/poll",
		"internal/race",
		"internal/singleflight",
		"internal/syscall/unix",
		"internal/testlog",
		"internal/x/crypto/chacha20poly1305",
		"internal/x/crypto/cryptobyte",
		"internal/x/crypto/cryptobyte/asn1",
		"internal/x/crypto/curve25519",
		"internal/x/crypto/hkdf",
		"internal/x/crypto/internal/chacha20",
		"internal/x/crypto/poly1305",
		"internal/x/net/dns/dnsmessage",
		"internal/x/net/http/httpguts",
		"internal/x/net/http/httpproxy",
		"internal/x/net/http2/hpack",
		"internal/x/net/idna",
		"internal/x/net/route",
		"internal/x/text/secure/bidirule",
		"internal/x/text/transform",
		"internal/x/text/unicode/bidi",
		"internal/x/text/unicode/norm",
		"io",
		"io/ioutil",
		"log",
		"math",
		"math/big",
		"math/bits",
		"math/rand",
		"mime",
		"mime/multipart",
		"mime/quotedprintable",
		"net",
		"net/http",
		"net/http/httptrace",
		"net/http/internal",
		"net/rpc",
		"net/textproto",
		"net/url",
		"os",
		"os/exec",
		"os/user",
		"path",
		"path/filepath",
		"reflect",
		"regexp",
		"regexp/syntax",
		"runtime",
		"runtime/cgo",
		"runtime/debug",
		"runtime/internal/atomic",
		"runtime/internal/math",
		"runtime/internal/sys",
		"runtime/trace",
		"sort",
		"strconv",
		"strings",
		"sync",
		"sync/atomic",
		"syscall",
		"testing",
		"text/tabwriter",
		"text/template",
		"text/template/parse",
		"time",
		"unicode",
		"unicode/utf16",
		"unicode/utf8",
		"unsafe"
	],
	"TestGoFiles": [
		"converters_test.go"
	],
	"TestImports": [
		"github.com/elastic/go-libaudit/rule",
		"github.com/smartystreets/goconvey/convey",
		"go.aporeto.io/gaia/types",
		"testing"
	]
}

@stamblerre
Copy link
Contributor

The errors in your logs plus the go list results indicate that we are finding packages for your file, but then failing to cache them. It's possible we're encountering a race condition that was fixed a few days ago (https://go-review.googlesource.com/c/tools/+/183978) - are you using a version of gopls that would include that change?

A smaller way to repro would be to run gopls -rpc.trace -v check /path/to/file.go and then share the logs. There may be some additional information there.

@stamblerre
Copy link
Contributor

@zikaeroh: Based on your logs, your issue seems to be different from @primalmotion's. Do you mind filing a separate issue?

@stamblerre
Copy link
Contributor

@primalmotion: I think you are encountering the current instabilities of gopls. We are working on some significant restructuring to the caching layer right now, so I will check back in with you once we submit some of the changes related to this.

@stamblerre stamblerre changed the title x/tools/gopls: since a few commits, gopls seems to break every 2m x/tools/gopls: begins to fail after some use Jul 8, 2019
@primalmotion
Copy link
Author

@stamblerre ok perfect. thanks!

@zikaeroh
Copy link
Contributor

zikaeroh commented Jul 9, 2019

@stamblerre I'll file another issue when I can reproduce it. I saved my repo as it was when things broke, but going back to it doesn't have the same result anymore. Perhaps some build cache got populated or something. I'll wait and see...

@peterbourgon
Copy link

peterbourgon commented Jul 10, 2019

$ gopls version
golang.org/x/tools/cmd/gopls v0.1.3-cmd.gopls
    golang.org/x/tools@v0.0.0-20190710165951-554846603d9b h1:I7162G9YBZIueNxlpTOgGoz1oiV1/Kuhqm3ZiGN8lGk=

I continue to experience regular failures of gopls, manifesting as a red squiggle under the package xxx declaration at the top of any file, and a failure to perform any other action, like formatting on save, import organization, click-to-definition, etc. The debug log shows the same messages repeatedly:

[Error - 10:48:48 AM] unable to check package for file:///Users/pbourgon/mod/[redacted]/record.go: failed to cache file file:///Users/pbourgon/mod/[redacted]/get_repos.go: no AST for file:///Users/pbourgon/mod/[redacted]/get_repos.go
[Error - 10:48:48 AM] unable to check package for file:///Users/pbourgon/mod/[redacted]/record.go: failed to cache file file:///Users/pbourgon/mod/[redacted]/get_repos.go: no AST for file:///Users/pbourgon/mod/[redacted]/get_repos.go
[Error - 10:48:48 AM] unable to check package for file:///Users/pbourgon/mod/[redacted]/record.go: failed to cache file file:///Users/pbourgon/mod/[redacted]/get_repos.go: no AST for file:///Users/pbourgon/mod/[redacted]/get_repos.go
[Error - 10:48:48 AM] Request textDocument/documentLink failed.
  Message: no AST for file:///Users/pbourgon/mod/[redacted]/record.go
  Code: 0

Killing gopls and having VS Code automatically restart it fixes the issue for a short while.

I'm not sure which issue is the right place to report these failures anymore.

@stamblerre
Copy link
Contributor

@peterbourgon: This issue works. Would you be able to share your full logs? You will need to add -rpc.trace to go.languageServerFlags. Does it seem like anything triggers this behavior, or does it just happen randomly?

@peterbourgon
Copy link

It seems to happen randomly, usually after working in a project for more than 10 or 15 minutes. I'll add those flags and send the full logs when it happens again.

@jguenther
Copy link

I'm also having this same problem as @peterbourgon, but with gopls under lsp-mode in emacs. Restarting gopls and closing and reopening the file seems to fix it temporarily, but after a few minutes of usage it usually happens again (and sometimes happens immediately).

LSP :: no AST for file:///path/to/the/current/file.go

I'll try getting some trace logs when I get a chance

@stamblerre stamblerre added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. labels Jul 11, 2019
@peterbourgon
Copy link

peterbourgon commented Jul 25, 2019

@stamblerre Forgive the long delay, I've finally got a complete debug log for a session where this occurred. Due to its size (3.7MB, 36k lines) and some potentially sensitive project-related details, I'd prefer to send it to you in a non-public way. Can you give me some instructions for that, either here, via Twitter DM @peterbourgon, or Keybase peterbourgon?

edit: also congrats on your talk today 🎉

@stamblerre
Copy link
Contributor

@peterbourgon: Thanks! That would be great. If you're able to redact the sensitive content, that might be easier, but if you prefer to just send it privately, you can send it via email: rstambler@golang.org.

@peterbourgon
Copy link

@stamblerre I've sent you the output from the original project I was talking about via email, but it's just happened to me again on a less-sensitive project, which I can post here. The errors seem to be slightly different, but the effect in the editor is the same: features stop working, and a red squiggle under the package declaration at the top of the file, with hover telling me "file:///whatever.go is not part of a package LSP".

@stamblerre
Copy link
Contributor

@peterbourgon: It looks like you are using an older version of gopls (your logs say v0.1.1, while the current version is v0.1.3). Can you please update by running go get golang.org/x/tools/gopls@latest?

@peterbourgon
Copy link

I have updated, but I hope you can still extract useful signal from the existing reports.

@stamblerre
Copy link
Contributor

We have made a number of stability improvements since v0.1.1, so unfortunately, I don't think the logs you provided will be useful in diagnosing current gopls issues. However, I hope that updating to a better version might solve some of these. Please comment here if you still encounter similar issues.

@stamblerre stamblerre removed the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Aug 5, 2019
@peterbourgon
Copy link

peterbourgon commented Aug 6, 2019

Lucky (in a sense) — immediately after upgrading and starting a coding session, I hit the same problem again. Here are the logs.

To contextualize things a bit, I was going along fine, and renamed a file at around 7:30pm, after which VS Code complained that the types in that file were previously defined elsewhere—presumably confused with the file I had just renamed from. I restarted gopls via pkill gopls at precisely 7:33:58pm, which you can see in the logs. Almost immediately after that, I started getting the red squiggle under the package declaration: whatever.go is not part of a package.

$ gopls version
golang.org/x/tools/gopls v0.1.2
    golang.org/x/tools/gopls@v0.1.3 h1:CB5ECiPysqZrwxcyRjN+exyZpY0gODTZvNiqQi3lpeo=

@stamblerre
Copy link
Contributor

stamblerre commented Aug 6, 2019

Renaming a file is a particularly tricky case in LSP, which is why we don't handle it well yet.
That said, restarting gopls should have fixed the problem.

Had you opened the command_test.go file previously?
Can you cd into your project's directory and share the output of gopls -rpc.trace -v check command_test.go?

@gopherbot
Copy link

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@Xjs
Copy link
Contributor

Xjs commented Aug 12, 2019

Timeout after 6 days? Looks like a mistake, @gopherbot!

@stamblerre
Copy link
Contributor

@Xjs: The timeout is calculated based on the time since the last response by the OP. I will re-open this issue, since I am still waiting on a response from @peterbourgon.

@stamblerre stamblerre reopened this Aug 12, 2019
@peterbourgon
Copy link

For the record I have been trying to get a repro case of what happened before, but getting precisely those events to line up again has been difficult. However: there have been plenty of times where similar things have occurred, i.e. I perform some action and one or more Go source files become permanently mis-parsed by gopls. The original problem (whatever.go is not part of a package) is one of the manifestations but I've seen others, incorrect claims that types are defined twice, that types aren't defined at all, others I'm forgetting. Would providing logs and that gopls ... check output for these cases be helpful, too?

@stamblerre
Copy link
Contributor

Yes, that would be useful. These all sound like different issues (types defined twice usually implies build tags, etc.), so if you'd be willing to file an issue when you encounter a problem, that would be very helpful. All you would need to provide is the output of the gopls check command and information about what action caused the issue. Any problem you encounter is worth filing an issue about.

It might be easiest if I close this issue for now since it's so long, and we can discuss again once you encounter a new problem. Thanks so much for your help!

@golang golang locked and limited conversation to collaborators Aug 11, 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. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

9 participants