Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gocode panic #482

Open
Strum355 opened this issue Oct 31, 2017 · 4 comments
Open

gocode panic #482

Strum355 opened this issue Oct 31, 2017 · 4 comments

Comments

@Strum355
Copy link

Strum355 commented Oct 31, 2017

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? :)

@kovetskiy
Copy link

Oh, I run into this problem too. Removing all outdated (compiled with old golang version) .a files from $GOPATH/pkg helped me.

@fishioon
Copy link

fishioon commented Dec 7, 2017

Remove all .a files and gocode, and reinstall gocode

@kovetskiy
Copy link

@nsf can you please handle this case and add some message like "package is outdated, please rebuild" or something like that?

@nsf
Copy link
Owner

nsf commented Dec 17, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants