Skip to content
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.

go1.7rc6 darwin/amd64 autocompletion panic #425

Closed
mattetti opened this issue Aug 12, 2016 · 6 comments
Closed

go1.7rc6 darwin/amd64 autocompletion panic #425

mattetti opened this issue Aug 12, 2016 · 6 comments

Comments

@mattetti
Copy link
Contributor

I tried to update to the latest and hopefully final RC of Go 1.7 and I noticed that autocompletion broke.

autocompletion-panic

I know that the binary output changed in 1.7 and I updated all the go tools vscode reported using. The README says gocode version is used for autocompletion and I wonder if the API changed?
The extension panics but I can't find any specific errors or trace anywhere.

@mattetti
Copy link
Contributor Author

I am using a local build in debug mode and found what I think is the root cause, gocode is hanging when asking for autocompletion:

gocode -f=json autocomplete "path/to.my/file_test.go" c42

Doesn't return

@mattetti
Copy link
Contributor Author

This looks suspiciously similar to #322 which was fixed. However nsf/gocode#305 seems to indicate gocode doesn't yet support 1.7 With 1.7 out in a few days, this might cause some serious issues for VSCode users.

@mattetti
Copy link
Contributor Author

Good news everyone, I found the root cause. The problem is that I updated Go to 1.7 but Gocode was running its daemon in the background and wasn't aware of the change of version. Gocode uses a server/client architecture and VSCode was trying to communicate with the server but the request was hanging. Restarting gocode solved the problem and everything is great again!

tl;dr: restart gocode

If you encounter this issue, in your terminal, type:
gocode close

Then restart Code and everything should be working well again.

@nikhilraog09
Copy link

'gocode' is not recognized as an internal or external command,
operable program or batch file.

@brinduc
Copy link

brinduc commented Aug 24, 2016

Actually only updating gocode worked for me (restarting didn't)

@lgohoang
Copy link

If use windows

cd $HOME$/lib/bin

gocode close

example:

cd D:\Development\Go\Lib\bin
gocode close

@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants