-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.
Milestone
Description
What did you do?
After vscode (1.41.1-1576681836 @ Ubuntu 16.04) upgraded gopls from v0.2.2 to v0.3.1, it crashes on start.
I could not isolate it to specific code. Gopls only crashes inside vscode. My project (some 66 .go files, using go-yara C interface) does not produce a crash when I run
find . -name '*.go' | grep -v vendor | xargs gopls -rpc.trace -v check
I have downgraded to v0.2.2 for now.
What did you expect to see?
No crash
What did you see instead?
vscode reports gopls output:
[Info - 3:58:01 PM] 2020/02/07 15:58:01 Build info
----------
golang.org/x/tools/gopls v0.3.1
golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7 h1:hWZVyLW37WdETuLIGQMvQIhMfXXAOANmAIEAluZMy3c=
golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=
Go info
-------
go version go1.13.7 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/willem/.cache/go-build"
GOENV="/home/willem/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/willem/code/golang"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/willem/Sync/golang/src/github.com/gwillem/project/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-L/opt/yara-3.8.1/libyara/.libs -lyara -lm"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build847115564=/tmp/go-build -gno-record-gcc-switches"
[Info - 3:58:07 PM] 2020/02/07 15:58:07 go/packages.Load
snapshot = 0
query = [./... builtin]
packages = 42
panic: interface conversion: imports.Resolver is *imports.gopathResolver, not *imports.ModuleResolver
goroutine 9061 [running]:
golang.org/x/tools/internal/lsp/cache.(*view).RunProcessEnvFunc(0xc000372000, 0xe55740, 0xc008bd57a0, 0xc0011ef3b0, 0x0, 0x0)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/lsp/cache/view.go:318 +0x5e7
golang.org/x/tools/internal/lsp/source.AllImportsFixes(0xe55740, 0xc008bd57a0, 0xe656e0, 0xc015350060, 0xe537c0, 0xc015350000, 0x0, 0x13661f0, 0x1, 0x1, ...)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/lsp/source/format.go:90 +0x684
golang.org/x/tools/internal/lsp.(*Server).codeAction(0xc000222fc0, 0xe55740, 0xc00446a2a0, 0xc003abf700, 0xc003abf700, 0x0, 0x0, 0x0, 0xc000120580)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/lsp/code_action.go:74 +0x95a
golang.org/x/tools/internal/lsp.(*Server).CodeAction(0xc000222fc0, 0xe55740, 0xc00446a2a0, 0xc003abf700, 0xc003abf700, 0x0, 0x0, 0x40e26b, 0x40e438)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/lsp/server_gen.go:12 +0x4d
golang.org/x/tools/internal/lsp/protocol.serverHandler.Deliver(0xe73460, 0xc000222fc0, 0xe55740, 0xc00446a2a0, 0xc001d50340, 0xc00446a200, 0xc0012da960)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/lsp/protocol/tsserver.go:433 +0x25ff
golang.org/x/tools/internal/jsonrpc2.(*Conn).Run.func1(0xc00a984360, 0xc001d50340, 0xc000284480, 0xe55740, 0xc00446a2a0, 0x0, 0x0, 0xc001c41cd0)
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/jsonrpc2/jsonrpc2.go:370 +0x170
created by golang.org/x/tools/internal/jsonrpc2.(*Conn).Run
/home/willem/code/golang/pkg/mod/golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7/internal/jsonrpc2/jsonrpc2.go:354 +0x877
[Error - 4:01:04 PM] Request textDocument/codeAction failed.
Message: method "textDocument/codeAction" did not reply
Code: -32603
[Info - 4:01:04 PM] Connection to server got closed. Server will restart.
[Error - 4:01:04 PM] Request textDocument/documentSymbol failed.
Build info
golang.org/x/tools/gopls v0.3.1
golang.org/x/tools/gopls@v0.3.1 h1:yNTWrf4gc4Or0UecjOas5pzOa3BL0WDDyKDV4Wz5VaM=
github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=
golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=
golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
golang.org/x/tools@v0.0.0-20200204151227-34c67990bfe7 h1:hWZVyLW37WdETuLIGQMvQIhMfXXAOANmAIEAluZMy3c=
golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=
honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=
mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=
Go info
go version go1.13.7 linux/amd64
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/willem/.cache/go-build"
GOENV="/home/willem/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/willem/code/golang"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/opt/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/willem/go/project/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-build407652727=/tmp/go-build -gno-record-gcc-switches"
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.This label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.Issues related to the Go language server, gopls.