golang / go

The Go programming language
https://go.dev
BSD 3-Clause "New" or "Revised" License
123.62k stars 17.61k forks source link

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

Closed primalmotion closed 5 years ago

primalmotion commented 5 years ago

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:

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

thepudds commented 5 years ago

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 commented 5 years ago

Sure I will try to collect diagnostics

primalmotion commented 5 years ago

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 commented 5 years ago

and this is what shows my error window

Screen Shot 2019-06-11 at 14 20 57
ianthehat commented 5 years ago

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 commented 5 years ago

I was already on the tip..

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

primalmotion commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 https://github.com/golang/go/issues/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 https://github.com/golang/go/issues/32562.

primalmotion commented 5 years ago

@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 commented 5 years ago

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

primalmotion commented 5 years ago

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 commented 5 years ago

this time I'm not moving any files around

stamblerre commented 5 years ago

@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 commented 5 years ago

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

primalmotion commented 5 years ago

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 commented 5 years ago

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

primalmotion commented 5 years ago

Sure, I will next time it happens

primalmotion commented 5 years ago
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 commented 5 years ago

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

primalmotion commented 5 years ago

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

stamblerre commented 5 years ago

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?

primalmotion commented 5 years ago

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 commented 5 years ago

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.

primalmotion commented 5 years ago
gopls -rpc.trace -v check /Users/tonio/Documents/Aporeto/workspace/code/go/src/go.aporeto.io/apoctl/internal/audit/main.go
2019/07/02 12:44:33 Info:Build info
----------
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-build026273333=/tmp/go-build -gno-record-gcc-switches -fno-common"

I tried that on multiple files, that is all I get

stamblerre commented 5 years ago

That's unexpected - I'd think it would return the diagnostic that you were seeing the editor. By the way, do you have -rpc.trace set in your go.languageServerFlags settings? If not, can you share new logs with that setting? It will add detail.

primalmotion commented 5 years ago

here's the trace trace.zip

This time, things started to go south when gopls decided that some properties of objects in a library do not exist (they do)

primalmotion commented 5 years ago

trrace-2.zip

Another one. This time, I changed the prototype of a function, that broke the unit test, then I finally decided that no, and undo the change. The test is still broken waiting for an additional parameter that does not exist

zikaeroh commented 5 years ago

I'm not sure if this is exactly the same, but I also get the "is not part of a package" and "no packages found for ..." messages, but in my case I don't need to do any work to get there, just open my project. The code is buildable and testable.

gopls version:

golang.org/x/tools/cmd/gopls v0.1.1-cmd.gopls
    golang.org/x/tools@v0.0.0-20190703212419-2214986f1668 h1:3LJOYcj2ObWSZJXX21oGIIPv5SaOoi5JkzQTWnCXRhg=

Trace logs:

2019/07/04 12:22:36 Debug serving on port: 6060
[Trace - 12:22:36 PM] Sending request 'initialize - (0)'.
Params: {"processId":17570,"rootPath":"/home/jake/zikaeroh/hortbot/hortbot","rootUri":"file:///home/jake/zikaeroh/hortbot/hortbot","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"]}},"definition":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true},"implementation":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true}}},"initializationOptions":{"funcSnippetEnabled":false,"gocodeCompletionEnabled":true},"trace":"off","workspaceFolders":[{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot","name":"hortbot"}]}

[Trace - 12:22:36 PM] Received response 'initialize - (0)' in 154ms.
Params: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"hoverProvider":true,"completionProvider":{"triggerCharacters":["."]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":true,"documentFormattingProvider":true,"renameProvider":true,"documentLinkProvider":{},"typeDefinitionProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"custom":null}

[Trace - 12:22:36 PM] Sending notification 'initialized'.
Params: {}

[Trace - 12:22:36 PM] Received request 'client/registerCapability - (1)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}

[Trace - 12:22:36 PM] Sending response 'client/registerCapability - (1)' in 24ms.
Params: {}

[Trace - 12:22:36 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///home/jake/zikaeroh/hortbot/hortbot","section":"gopls"}]}

[Trace - 12:22:36 PM] Sending response 'workspace/configuration - (2)' in 11ms.
Params: [{"usePlaceholders":false}]

[Trace - 12:22:37 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"Build info\n----------\ngolang.org/x/tools/cmd/gopls v0.1.1-cmd.gopls\n    golang.org/x/tools@v0.0.0-20190703212419-2214986f1668 h1:3LJOYcj2ObWSZJXX21oGIIPv5SaOoi5JkzQTWnCXRhg=\n    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n\nGo info\n-------\ngo version go1.12.6 linux/amd64\n\nGOARCH=\"amd64\"\nGOBIN=\"\"\nGOCACHE=\"/home/jake/.cache/go-build\"\nGOEXE=\"\"\nGOFLAGS=\"\"\nGOHOSTARCH=\"amd64\"\nGOHOSTOS=\"linux\"\nGOOS=\"linux\"\nGOPATH=\"/home/jake/go\"\nGOPROXY=\"\"\nGORACE=\"\"\nGOROOT=\"/usr/lib/go\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/usr/lib/go/pkg/tool/linux_amd64\"\nGCCGO=\"gccgo\"\nCC=\"gcc\"\nCXX=\"g++\"\nCGO_ENABLED=\"1\"\nGOMOD=\"/home/jake/zikaeroh/hortbot/hortbot/go.mod\"\nCGO_CFLAGS=\"-g -O2\"\nCGO_CPPFLAGS=\"\"\nCGO_CXXFLAGS=\"-g -O2\"\nCGO_FFLAGS=\"-g -O2\"\nCGO_LDFLAGS=\"-g -O2\"\nPKG_CONFIG=\"pkg-config\"\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build912544465=/tmp/go-build -gno-record-gcc-switches\"\n"}

[Trace - 12:22:37 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go","languageId":"go","version":1,"text":"package bot\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/gobuffalo/flect\"\n\t\"github.com/hortbot/hortbot/internal/db/models\"\n\t\"github.com/volatiletech/sqlboiler/boil\"\n\t\"github.com/volatiletech/sqlboiler/queries/qm\"\n)\n\nvar repeatCommands handlerMap = map[string]handlerFunc{\n\t\"add\":    {fn: cmdRepeatAdd, minLevel: levelModerator},\n\t\"delete\": {fn: cmdRepeatDelete, minLevel: levelModerator},\n\t\"remove\": {fn: cmdRepeatDelete, minLevel: levelModerator},\n\t\"on\":     {fn: cmdRepeatOnOff, minLevel: levelModerator},\n\t\"off\":    {fn: cmdRepeatOnOff, minLevel: levelModerator},\n\t\"list\":   {fn: cmdRepeatList, minLevel: levelModerator},\n}\n\nfunc cmdRepeat(ctx context.Context, s *session, cmd string, args string) error {\n\tsubcommand, args := splitSpace(args)\n\tsubcommand = strings.ToLower(subcommand)\n\n\tok, err := repeatCommands.run(ctx, s, subcommand, args)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !ok {\n\t\treturn s.ReplyUsage(\"add|delete|on|off|list ...\")\n\t}\n\n\treturn nil\n}\n\nfunc cmdRepeatAdd(ctx context.Context, s *session, cmd string, args string) error {\n\tusage := func() error {\n\t\treturn s.ReplyUsage(\"<name> <delay in seconds> [message difference]\")\n\t}\n\n\tname, args := splitSpace(args)\n\tdelayStr, messageDiffStr := splitSpace(args)\n\n\tif name == \"\" {\n\t\treturn usage()\n\t}\n\n\tname = strings.ToLower(name)\n\n\tdelay, err := strconv.Atoi(delayStr)\n\tif err != nil {\n\t\treturn usage()\n\t}\n\n\tif delay < 30 {\n\t\treturn s.Reply(\"Delay must be at least 30 seconds.\")\n\t}\n\n\tmessageDiff := int64(1)\n\n\tif messageDiffStr != \"\" {\n\t\tmessageDiff, err = strconv.ParseInt(messageDiffStr, 10, 64)\n\t\tif err != nil {\n\t\t\treturn usage()\n\t\t}\n\n\t\tif messageDiff <= 0 {\n\t\t\treturn s.Reply(\"Message difference must be at least 1.\")\n\t\t}\n\t}\n\n\tcommand, repeat, err := findRepeatedCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its repeat.\", name, al, al)\n\t}\n\n\tif repeat != nil {\n\t\trepeat.Delay = delay\n\t\trepeat.MessageDiff = messageDiff\n\t\trepeat.Enabled = true\n\t\trepeat.LastCount = s.N\n\n\t\tcolumns := boil.Whitelist(\n\t\t\tmodels.RepeatedCommandColumns.UpdatedAt,\n\t\t\tmodels.RepeatedCommandColumns.Delay,\n\t\t\tmodels.RepeatedCommandColumns.MessageDiff,\n\t\t\tmodels.RepeatedCommandColumns.Enabled,\n\t\t\tmodels.RepeatedCommandColumns.LastCount,\n\t\t)\n\n\t\tif err := repeat.Update(ctx, s.Tx, columns); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\trepeat = &models.RepeatedCommand{\n\t\t\tChannelID:       s.Channel.ID,\n\t\t\tSimpleCommandID: command.ID,\n\t\t\tEnabled:         true,\n\t\t\tDelay:           delay,\n\t\t\tMessageDiff:     messageDiff,\n\t\t\tLastCount:       s.N,\n\t\t}\n\n\t\tif err := repeat.Insert(ctx, s.Tx, boil.Infer()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\ts.Deps.UpdateRepeat(repeat.ID, true, time.Duration(delay)*time.Second, 0)\n\n\tdUnit := \"message has passed.\"\n\tif messageDiff != 1 {\n\t\tdUnit = \"messages have passed.\"\n\t}\n\n\treturn s.Replyf(\"Command '%s' will now repeat every %d seconds if at least %d %s\", name, delay, messageDiff, dUnit)\n}\n\nfunc cmdRepeatDelete(ctx context.Context, s *session, cmd string, args string) error {\n\tname, _ := splitSpace(args)\n\n\tif name == \"\" {\n\t\treturn s.ReplyUsage(\"<name>\")\n\t}\n\n\tname = strings.ToLower(name)\n\n\tcommand, repeat, err := findRepeatedCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif repeat == nil {\n\t\treturn s.Replyf(\"Command '%s' has no repeat.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its repeat.\", name, al, al)\n\t}\n\n\tif err := repeat.Delete(ctx, s.Tx); err != nil {\n\t\treturn err\n\t}\n\n\ts.Deps.UpdateRepeat(repeat.ID, false, 0, 0)\n\n\treturn s.Replyf(\"Command '%s' will no longer repeat.\", name)\n}\n\nfunc cmdRepeatOnOff(ctx context.Context, s *session, cmd string, args string) error {\n\tname, _ := splitSpace(args)\n\n\tif name == \"\" {\n\t\treturn s.ReplyUsage(\"<name>\")\n\t}\n\n\tname = strings.ToLower(name)\n\n\tenable := cmd == \"on\"\n\n\tcommand, repeat, err := findRepeatedCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif repeat == nil {\n\t\treturn s.Replyf(\"Command '%s' has no repeat.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its repeat.\", name, al, al)\n\t}\n\n\tif repeat.Enabled == enable {\n\t\tif enable {\n\t\t\treturn s.Replyf(\"Repeated command '%s' is already enabled.\", name)\n\t\t}\n\t\treturn s.Replyf(\"Repeated command '%s' is already disabled.\", name)\n\t}\n\n\trepeat.Enabled = enable\n\trepeat.LastCount = s.N\n\n\tif err := repeat.Update(ctx, s.Tx, boil.Whitelist(models.RepeatedCommandColumns.UpdatedAt, models.RepeatedCommandColumns.Enabled, models.RepeatedCommandColumns.LastCount)); err != nil {\n\t\treturn err\n\t}\n\n\ts.Deps.UpdateRepeat(repeat.ID, enable, time.Duration(repeat.Delay)*time.Second, 0)\n\n\tif enable {\n\t\treturn s.Replyf(\"Repeated command '%s' is now enabled.\", name)\n\t}\n\n\treturn s.Replyf(\"Repeated command '%s' is now disabled.\", name)\n}\n\nfunc cmdRepeatList(ctx context.Context, s *session, cmd string, args string) error {\n\trepeats, err := models.RepeatedCommands(\n\t\tmodels.RepeatedCommandWhere.ChannelID.EQ(s.Channel.ID),\n\t\tqm.Load(models.RepeatedCommandRels.SimpleCommand),\n\t).All(ctx, s.Tx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(repeats) == 0 {\n\t\treturn s.Reply(\"There are no repeated commands.\")\n\t}\n\n\tsort.Slice(repeats, func(i, j int) bool {\n\t\treturn repeats[i].R.SimpleCommand.Name < repeats[j].R.SimpleCommand.Name\n\t})\n\n\tvar builder strings.Builder\n\tbuilder.WriteString(\"Repeated commands: \")\n\n\tfor i, repeat := range repeats {\n\t\tif i != 0 {\n\t\t\tbuilder.WriteString(\", \")\n\t\t}\n\n\t\tbuilder.WriteString(repeat.R.SimpleCommand.Name)\n\t\tbuilder.WriteString(\" [\")\n\n\t\tif repeat.Enabled {\n\t\t\tbuilder.WriteString(\"ON\")\n\t\t} else {\n\t\t\tbuilder.WriteString(\"OFF\")\n\t\t}\n\n\t\tbuilder.WriteString(\"] (\")\n\t\tbuilder.WriteString(strconv.Itoa(repeat.Delay))\n\t\tbuilder.WriteByte(')')\n\t}\n\n\treturn s.Reply(builder.String())\n}\n\nfunc findRepeatedCommand(ctx context.Context, name string, s *session) (*models.SimpleCommand, *models.RepeatedCommand, error) {\n\tcommand, err := models.SimpleCommands(\n\t\tmodels.SimpleCommandWhere.ChannelID.EQ(s.Channel.ID),\n\t\tmodels.SimpleCommandWhere.Name.EQ(name),\n\t\tqm.Load(models.SimpleCommandRels.RepeatedCommand),\n\t).One(ctx, s.Tx)\n\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil, nil\n\t}\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn command, command.R.RepeatedCommand, nil\n}\n"}}

[Trace - 12:22:37 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go","languageId":"go","version":1,"text":"package bot\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\n\t\"github.com/angadn/cronexpr\"\n\t\"github.com/gobuffalo/flect\"\n\t\"github.com/hortbot/hortbot/internal/db/models\"\n\t\"github.com/volatiletech/sqlboiler/boil\"\n\t\"github.com/volatiletech/sqlboiler/queries/qm\"\n)\n\nvar scheduleCommands handlerMap = map[string]handlerFunc{\n\t\"add\":    {fn: cmdScheduleAdd, minLevel: levelModerator},\n\t\"delete\": {fn: cmdScheduleDelete, minLevel: levelModerator},\n\t\"remove\": {fn: cmdScheduleDelete, minLevel: levelModerator},\n\t\"on\":     {fn: cmdScheduleOnOff, minLevel: levelModerator},\n\t\"off\":    {fn: cmdScheduleOnOff, minLevel: levelModerator},\n\t\"list\":   {fn: cmdScheduleList, minLevel: levelModerator},\n}\n\nfunc cmdSchedule(ctx context.Context, s *session, cmd string, args string) error {\n\tsubcommand, args := splitSpace(args)\n\tsubcommand = strings.ToLower(subcommand)\n\n\tok, err := scheduleCommands.run(ctx, s, subcommand, args)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif !ok {\n\t\treturn s.ReplyUsage(\"add|delete|on|off|list ...\")\n\t}\n\n\treturn nil\n}\n\nfunc cmdScheduleAdd(ctx context.Context, s *session, cmd string, args string) error {\n\tusage := func() error {\n\t\treturn s.ReplyUsage(\"<name> <pattern> [message difference]\")\n\t}\n\n\tname, args := splitSpace(args)\n\tpattern, messageDiffStr := splitSpace(args)\n\n\tif name == \"\" || pattern == \"\" {\n\t\treturn usage()\n\t}\n\n\tname = strings.ToLower(name)\n\n\tpattern = strings.ReplaceAll(pattern, \"_\", \" \")\n\n\texpr, err := cronexpr.Parse(pattern)\n\tif err != nil {\n\t\treturn s.Replyf(\"Bad cron expression: %s\", pattern)\n\t}\n\n\tmessageDiff := int64(1)\n\n\tif messageDiffStr != \"\" {\n\t\tmessageDiff, err = strconv.ParseInt(messageDiffStr, 10, 64)\n\t\tif err != nil {\n\t\t\treturn usage()\n\t\t}\n\n\t\tif messageDiff <= 0 {\n\t\t\treturn s.Reply(\"Message difference must be at least 1.\")\n\t\t}\n\t}\n\n\tcommand, scheduled, err := findScheduledCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its schedule.\", name, al, al)\n\t}\n\n\tif scheduled != nil {\n\t\tscheduled.CronExpression = pattern\n\t\tscheduled.MessageDiff = messageDiff\n\t\tscheduled.Enabled = true\n\t\tscheduled.LastCount = s.N\n\n\t\tcolumns := boil.Whitelist(\n\t\t\tmodels.ScheduledCommandColumns.UpdatedAt,\n\t\t\tmodels.ScheduledCommandColumns.CronExpression,\n\t\t\tmodels.ScheduledCommandColumns.MessageDiff,\n\t\t\tmodels.ScheduledCommandColumns.Enabled,\n\t\t\tmodels.ScheduledCommandColumns.LastCount,\n\t\t)\n\n\t\tif err := scheduled.Update(ctx, s.Tx, columns); err != nil {\n\t\t\treturn err\n\t\t}\n\t} else {\n\t\tscheduled = &models.ScheduledCommand{\n\t\t\tChannelID:       s.Channel.ID,\n\t\t\tSimpleCommandID: command.ID,\n\t\t\tEnabled:         true,\n\t\t\tCronExpression:  pattern,\n\t\t\tMessageDiff:     messageDiff,\n\t\t\tLastCount:       s.N,\n\t\t}\n\n\t\tif err := scheduled.Insert(ctx, s.Tx, boil.Infer()); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\ts.Deps.UpdateSchedule(scheduled.ID, true, expr)\n\n\tdUnit := \"message has passed.\"\n\tif messageDiff != 1 {\n\t\tdUnit = \"messages have passed.\"\n\t}\n\n\treturn s.Replyf(\"Command '%s' has been scheduled with '%s' and will run if at least %d %s\", name, pattern, messageDiff, dUnit)\n}\n\nfunc cmdScheduleDelete(ctx context.Context, s *session, cmd string, args string) error {\n\tname, _ := splitSpace(args)\n\n\tif name == \"\" {\n\t\treturn s.ReplyUsage(\"<name>\")\n\t}\n\n\tname = strings.ToLower(name)\n\n\tcommand, scheduled, err := findScheduledCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif scheduled == nil {\n\t\treturn s.Replyf(\"Command '%s' has no schedule.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its repeat.\", name, al, al)\n\t}\n\n\tif err := scheduled.Delete(ctx, s.Tx); err != nil {\n\t\treturn err\n\t}\n\n\ts.Deps.UpdateSchedule(scheduled.ID, false, nil)\n\n\treturn s.Replyf(\"Command '%s' is no longer scheduled.\", name)\n}\n\nfunc cmdScheduleOnOff(ctx context.Context, s *session, cmd string, args string) error {\n\tname, _ := splitSpace(args)\n\n\tif name == \"\" {\n\t\treturn s.ReplyUsage(\"<name>\")\n\t}\n\n\tname = strings.ToLower(name)\n\n\tenable := cmd == \"on\"\n\n\tcommand, scheduled, err := findScheduledCommand(ctx, name, s)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif command == nil {\n\t\treturn s.Replyf(\"Command '%s' does not exist.\", name)\n\t}\n\n\tif scheduled == nil {\n\t\treturn s.Replyf(\"Command '%s' has no schedule.\", name)\n\t}\n\n\tif !s.UserLevel.CanAccess(newAccessLevel(command.AccessLevel)) {\n\t\tal := flect.Pluralize(command.AccessLevel)\n\t\treturn s.Replyf(\"Command '%s' is restricted to %s; only %s and above can modify its repeat.\", name, al, al)\n\t}\n\n\tif scheduled.Enabled == enable {\n\t\tif enable {\n\t\t\treturn s.Replyf(\"Scheduled command '%s' is already enabled.\", name)\n\t\t}\n\t\treturn s.Replyf(\"Scheduled command '%s' is already disabled.\", name)\n\t}\n\n\tscheduled.Enabled = enable\n\tscheduled.LastCount = s.N\n\n\tif err := scheduled.Update(ctx, s.Tx, boil.Whitelist(models.ScheduledCommandColumns.UpdatedAt, models.ScheduledCommandColumns.Enabled, models.RepeatedCommandColumns.LastCount)); err != nil {\n\t\treturn err\n\t}\n\n\texpr := cronexpr.MustParse(scheduled.CronExpression)\n\n\ts.Deps.UpdateSchedule(scheduled.ID, enable, expr)\n\n\tif enable {\n\t\treturn s.Replyf(\"Scheduled command '%s' is now enabled.\", name)\n\t}\n\n\treturn s.Replyf(\"Scheduled command '%s' is now disabled.\", name)\n}\n\nfunc cmdScheduleList(ctx context.Context, s *session, cmd string, args string) error {\n\tscheduleds, err := models.ScheduledCommands(\n\t\tmodels.ScheduledCommandWhere.ChannelID.EQ(s.Channel.ID),\n\t\tqm.Load(models.ScheduledCommandRels.SimpleCommand),\n\t).All(ctx, s.Tx)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif len(scheduleds) == 0 {\n\t\treturn s.Reply(\"There are no scheduled commands.\")\n\t}\n\n\tsort.Slice(scheduleds, func(i, j int) bool {\n\t\treturn scheduleds[i].R.SimpleCommand.Name < scheduleds[j].R.SimpleCommand.Name\n\t})\n\n\tvar builder strings.Builder\n\tbuilder.WriteString(\"Scheduled commands: \")\n\n\tfor i, scheduled := range scheduleds {\n\t\tif i != 0 {\n\t\t\tbuilder.WriteString(\", \")\n\t\t}\n\n\t\tbuilder.WriteString(scheduled.R.SimpleCommand.Name)\n\t\tbuilder.WriteString(\" [\")\n\n\t\tif scheduled.Enabled {\n\t\t\tbuilder.WriteString(\"ON\")\n\t\t} else {\n\t\t\tbuilder.WriteString(\"OFF\")\n\t\t}\n\n\t\tbuilder.WriteString(\"] (\")\n\t\tbuilder.WriteString(scheduled.CronExpression)\n\t\tbuilder.WriteByte(')')\n\t}\n\n\treturn s.Reply(builder.String())\n}\n\nfunc findScheduledCommand(ctx context.Context, name string, s *session) (*models.SimpleCommand, *models.ScheduledCommand, error) {\n\tcommand, err := models.SimpleCommands(\n\t\tmodels.SimpleCommandWhere.ChannelID.EQ(s.Channel.ID),\n\t\tmodels.SimpleCommandWhere.Name.EQ(name),\n\t\tqm.Load(models.SimpleCommandRels.ScheduledCommand),\n\t).One(ctx, s.Tx)\n\n\tif err == sql.ErrNoRows {\n\t\treturn nil, nil, nil\n\t}\n\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\treturn command, command.R.ScheduledCommand, nil\n}\n"}}

[Trace - 12:22:37 PM] Sending request 'textDocument/codeAction - (1)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go"},"range":{"start":{"line":231,"character":51},"end":{"line":231,"character":51}},"context":{"diagnostics":[]}}

[Info  - 12:22:37 PM] Build info
----------
golang.org/x/tools/cmd/gopls v0.1.1-cmd.gopls
    golang.org/x/tools@v0.0.0-20190703212419-2214986f1668 h1:3LJOYcj2ObWSZJXX21oGIIPv5SaOoi5JkzQTWnCXRhg=
    golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=

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

GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jake/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jake/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jake/zikaeroh/hortbot/hortbot/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build912544465=/tmp/go-build -gno-record-gcc-switches"

[Trace - 12:22:38 PM] Received response 'textDocument/codeAction - (1)' in 1816ms.
Params: [{"title":"Organize Imports","kind":"source.organizeImports","edit":{"changes":{"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go":[]}}}]

[Trace - 12:22:38 PM] Sending request 'textDocument/documentLink - (2)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go"}}

[Trace - 12:22:39 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:39 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:39 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:39 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:39 PM] Received response 'textDocument/documentLink - (2)' in 2707ms.
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":15}},"target":"https://godoc.org/database/sql"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":10}},"target":"https://godoc.org/strconv"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":7}},"target":"https://godoc.org/time"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":29}},"target":"https://godoc.org/github.com/gobuffalo/flect"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":48}},"target":"https://godoc.org/github.com/hortbot/hortbot/internal/db/models"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":41}},"target":"https://godoc.org/github.com/volatiletech/sqlboiler/boil"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":47}},"target":"https://godoc.org/github.com/volatiletech/sqlboiler/queries/qm"}]

[Trace - 12:22:39 PM] Sending request 'textDocument/documentLink - (3)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}}

[Trace - 12:22:39 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:39 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:39 PM] send textDocument/documentLink#3 no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go

[Trace - 12:22:39 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:39 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:39 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:39 PM] Request textDocument/documentLink failed.
  Message: no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
  Code: 0 
[Error - 12:22:39 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"severity":1,"source":"LSP","message":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go is not part of a package"}]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/repeat.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/simple_command.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_moderation.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_quote.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/rdb.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_simple_command.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/deps.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/builtin_commands.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_fun.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_management.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/helpers.go","diagnostics":[]}

[Trace - 12:22:39 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go","diagnostics":[]}

[Trace - 12:22:52 PM] Sending request 'textDocument/documentHighlight - (4)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"},"position":{"line":10,"character":28}}

[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"no highlight for /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go:11:29: no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:52 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:52 PM] Received response 'textDocument/documentHighlight - (4)' in 1ms.
Params: []

[Error - 12:22:52 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:52 PM] no highlight for /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go:11:29: no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:52 PM] Sending request 'textDocument/codeAction - (5)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"},"range":{"start":{"line":10,"character":28},"end":{"line":10,"character":28}},"context":{"diagnostics":[]}}

[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:52 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:52 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:52 PM] send textDocument/codeAction#5 no file information for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go

[Error - 12:22:52 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:52 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:52 PM] Request textDocument/codeAction failed.
  Message: no file information for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
  Code: 0 
[Trace - 12:22:53 PM] Sending request 'textDocument/hover - (6)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"},"position":{"line":16,"character":16}}

[Trace - 12:22:53 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:53 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:53 PM] send textDocument/hover#6 no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go

[Error - 12:22:53 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:53 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:53 PM] Request textDocument/hover failed.
  Message: no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
  Code: 0 
[Trace - 12:22:54 PM] Sending request 'textDocument/hover - (7)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"},"position":{"line":22,"character":16}}

[Trace - 12:22:54 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Trace - 12:22:54 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go"}

[Error - 12:22:54 PM] send textDocument/hover#7 no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go

[Error - 12:22:54 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:54 PM] unable to check package for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go: no packages found for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
[Error - 12:22:54 PM] Request textDocument/hover failed.
  Message: no AST for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go
  Code: 0 
[Trace - 12:24:14 PM] Sending request 'textDocument/documentLink - (8)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go"}}

[Trace - 12:24:14 PM] Received response 'textDocument/documentLink - (8)' in 0ms.
Params: [{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":10}},"target":"https://godoc.org/context"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":15}},"target":"https://godoc.org/database/sql"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":7}},"target":"https://godoc.org/sort"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":10}},"target":"https://godoc.org/strconv"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":10}},"target":"https://godoc.org/strings"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":7}},"target":"https://godoc.org/time"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":29}},"target":"https://godoc.org/github.com/gobuffalo/flect"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":48}},"target":"https://godoc.org/github.com/hortbot/hortbot/internal/db/models"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":41}},"target":"https://godoc.org/github.com/volatiletech/sqlboiler/boil"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":47}},"target":"https://godoc.org/github.com/volatiletech/sqlboiler/queries/qm"}]
</details>
stamblerre commented 5 years ago

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

stamblerre commented 5 years ago

@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.

primalmotion commented 5 years ago

@stamblerre ok perfect. thanks!

zikaeroh commented 5 years ago

@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 commented 5 years ago
$ 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 commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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

peterbourgon commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

@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 commented 5 years ago

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

stamblerre commented 5 years ago

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.

peterbourgon commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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

stamblerre commented 5 years ago

@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.

peterbourgon commented 5 years ago

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 commented 5 years ago

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!