Closed seagle0128 closed 6 years ago
Actually I found there is no output in $GOPATH/pkg, but should be there.
This issue is related to https://github.com/mdempsky/gocode/issues/47, I believe, since go install vendor/...
fix it manually. Please follow up.
cc @anjmao who recently updated our vendored gocode.
I'm using vscode and there is no such problem. Probably because vscode-go automatically builds to pkg. Even if I remove pkg folder on save I get pkg back. vscode output
Finished running tool: /usr/local/go/bin/go build -i -o /var/folders/jc/1233a/T/go-code-check.1693675331 do/cmd/server
Finished running tool: /usr/local/go/bin/go vet ./...
In go-langserver gocode binary cache is enabled by default. The only solution I see if you are not using vscode is to build vendor manually since gocode should not be responsible for doing that, but editor extension should.
@anjmao did you try cleaning all pkg and cache?
go clean -cache
rm -rf $GOAPTH/pkg
Basically I agree with you. But I revert to https://github.com/sourcegraph/go-langserver/commit/d0a69e92f6bdce74c7acdd59fdca57cca2a9587e , all work fine. All binary cache is generated automatically,while the latest build won't. The behaviors are different. Please check.
@keegancsmith @anjmao This commit https://github.com/sourcegraph/go-langserver/commit/28e52ba21ccbf22a81d274d5cfdd2179cac04b79 updated the gocode.
@seagle0128 Which editor are you using is it atom + go-plus?
@anjmao I am using Emacs + lsp-mode.
I tried eglot which is another lsp client of Emacs. The same issue.
Same problem with neovim + deoplete + LanguageClient-neovim. As @seagle0128 says, if I revert go-langserver to 28e52ba, everything works. @keegancsmith , @anjmao
We depend on upstream gocode, so until mdempsky/gocode#47 is solved, I don't think we have a solution. Something we could possible do is run go install
as part of go-langserver doing diagnostics.
They just closed that issue with "won't fix"...
I don't understand why. It's a regression issue IMO.
https://github.com/mdempsky/gocode/issues/47 has been fixed by https://github.com/mdempsky/gocode/commit/a07fefd98fdcd9d2c16aa3f61d8e89eda396bf99. Please merge. Thanks.
BTW: I noticed VS Code has switch to use https://github.com/stamblerre/gocode now.
Thanks a lot!
Thanks @imjustfly!
Thank you
I upgraded to the latest
go-langserver
, and found the local modules including vendor/ and others (e.g. common/, lib/ etc.) couldn't autocomplete. I reverted to d0a69e92f6bdce74c7acdd59fdca57cca2a9587e, and it works well. I doubt the issue is related to 28e52ba21ccbf22a81d274d5cfdd2179cac04b79.Running
go1.10.4 darwin/amd64