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 only works when run manually #389
Comments
Hm, I wonder where do you get the log from if you don't run And what do you mean you don't get any autocompletions? In the log or in nvim? |
Yeah, this is coming from |
It's just first log message looks weird to me. Is it stripped or something? If you take a look at the code: https://github.com/nsf/gocode/blob/master/server.go#L185-L209 It should print "Offset:" if it prints "Got autocompletion request". And I see none. Perhaps it hangs? Any signs of 100% cpu usage? |
That's very odd. No sign of 100% cpu; cpu is 0 at idle and 0.9% during completion requests. |
I also tried clearing my cache, in case it was confused between 1.6 and 1.7 artifacts. |
Is it possible that |
Panic is possible, but in this case it ends up here: https://github.com/nsf/gocode/blob/master/server.go#L136-L146 And returns one autocompletion result which is PANIC. And of course panic is also printed into the log. Mutation of g_debug is unlikely:
Only force-debug-output option writes true to it and that's it. |
I threw in some log statements around the aforementioned line. If I don't run |
|
Is it possible that you have multiple gocode binaries on your machine? What |
No idea why it's repeated; |
Have no idea why it shows it twice, maybe you have some duplication in your PATH env var. But that's okay, there is only one location at the end. Should work. |
So it looks like YouCompleteMe contains a gocode executable:
Last updated 7/30:
So I'm guessing this is to blame. |
That's interesting, I would get rid of it, but that's me, have no idea what YouCompleteMe does. |
@nsf Nor I. I only installed it for Python completions, but it was a pain to install and has been more trouble than it's worth. I'll try to disable it and see what happens. |
Also since it looks like a process, make sure you kill it :) |
After killing off all the ycmd processes, the first relaunched the correct gocode server, and I have my autocompletions back. Thanks very much for the debugging help! |
you're welcome |
For posterity, it looks like YCM clones the entire gocode repo and builds it at YCM's install time. It appears to completely disregard the gocode repo in your $GOPATH. Navigate to the YCM gocode directory and run |
You can use a YCM variable to specify the location of gocode to use. You'll want to do this for godef as well. let g:ycm_gocode_binary_path = "$GOPATH/bin/gocode" |
Hi, I hope this isn't a duplicate; I read through a bunch of the existing issues, tried searching, and generally did my due diligence before reporting. Apologies if I missed something. I'm not getting any completions from the default gocode server. When I close the server and run
gocode -s
, completions work fine. Without runninggocode -s
, the log output looks like this:With
gocode -s
, I see:Here's the output from
nvim --version
:My default shell is zsh (if that might affect anything)?
OSX version 10.11.6
The text was updated successfully, but these errors were encountered: