gocode
gocode copied to clipboard
gocode panic
So first, gocode wouldnt give the proper suggestions, suggesting every single variable name and keyword in alphabetical order, instead of eg struct fields. After running through a few troubleshooting tips, including go get -u, gocode -debug -s now prints out the following:
https://pastebin.com/L6QfKhEM
Go version: 1.9
go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/noah/Go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build580489866=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
Any help? :)
Oh, I run into this problem too. Removing all outdated (compiled with old golang version) .a files from $GOPATH/pkg helped me.
Remove all .a files and gocode, and reinstall gocode
@nsf can you please handle this case and add some message like "package is outdated, please rebuild" or something like that?
I don't think I can help from the gocode side in any way. We'll just have to live with that. Until somebody implements that "language service protocol" for Go, which I believe might have an API for reporting errors or something. In gocode I never actually thought about reporting errors via autocompletion protocol.