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

support go1.11 beta2 Go modules #523

Closed
wants to merge 24 commits into from
Closed

support go1.11 beta2 Go modules #523

wants to merge 24 commits into from

Conversation

visualfc
Copy link

@visualfc visualfc commented Jul 26, 2018

use github.com/visualfc/types to parser package and cached.
support vendor and Go1.11 modules.

Copy link

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me on go version go1.11beta2 darwin/amd64. Well done 🎉

@joefitzgerald
Copy link

I'm having issues getting completions from different packages in the same module. Tried with and without this patch, and the behavior was roughly the same.

@joefitzgerald
Copy link

joefitzgerald commented Aug 1, 2018

Are you aware that a module-aware loader is being worked on here by the go team?

@visualfc
Copy link
Author

visualfc commented Aug 1, 2018

@joefitzgerald thanks

Copy link

@VojtechVitek VojtechVitek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go get -u github.com/nsf/gocode
cd $GOPATH/src/github.com/nsf/gocode

# check out this PR
git config --add remote.origin.fetch '+refs/pull/*/head:refs/remotes/origin/pr/*'
git fetch
git checkout -t origin/pr/523

go install ./

Works well on go version go1.11beta3 darwin/amd64. Thank you!

@nsf
Copy link
Owner

nsf commented Aug 14, 2018

I'll take a look at it closer to Go 1.11 release. Since RC is already out, maybe this weekend.

@myitcv
Copy link
Contributor

myitcv commented Aug 24, 2018

Just to echo #523 (comment), gocode should almost certainly be using go/packages. This will also have the nice side effect of making the tool totally agnostic of build system (Blaze, Bazel, go tool).

See also:

@nsf
Copy link
Owner

nsf commented Aug 27, 2018

Yeah, sorry for not looking it. I guess it's time for me to draw a line here and declare gocode as not maintained. And it kind of was for quite some time. If you need autocompletion for go and gocode doesn't work for you, look for alternatives.

I decided not to merge this pull request, because it's pointless since I'm not maintaining the project anymore. Thanks for working on it though, feel free to keep a fork of it.

I know it will make a lot of people angry at me, but that's it. I'm done for now with open source projects. I will update a README with a note about this in a sec.

@VojtechVitek
Copy link

@visualfc can you please submit this PR against https://github.com/mdempsky/gocode?

@myitcv
Copy link
Contributor

myitcv commented Aug 28, 2018

@VojtechVitek as I mentioned in #523 (comment), the approach here should be to use go/packages.

@myitcv
Copy link
Contributor

myitcv commented Aug 28, 2018

See also mdempsky#46

@visualfc visualfc closed this Aug 28, 2018
@VojtechVitek
Copy link

Referencing the new fork: https://github.com/visualfc/gocode - works well with go1.11.

@myitcv
Hope someone will step up and (re-)write an autocompletion daemon on top of golang.org/x/tools/go/packages sometime soon. But given the NOTE: THIS PACKAGE IS NOT YET READY FOR WIDESPREAD USE: note on the GoDoc page, I'm not sure who'd dare at this point.

@VojtechVitek
Copy link

For anyone interested, https://github.com/stamblerre/gocode fork is built on top of golang.org/x/tools/go/packages.

Works for me so far and feels much faster.

@cnbuff410
Copy link

We really need one fork to incorporate all useful PRs. @nsf do you consider adding other maintainers to this project as this repo is still treated by many other people as the "official" source.

@nsf
Copy link
Owner

nsf commented Oct 3, 2018

No I'm not interesting in keeping it alive at all. I want something better. Where's my "go language server" with all the fancy features like typescript has for example? Sadly I won't be making one, even though I totally can. Hence I don't see a point in maintaining gocode with patches and hacks. Google has a whole team dedicated to Go, what are they doing?

@VojtechVitek
Copy link

@cnbuff410 Seems like https://github.com/stamblerre/gocode changes will end up in https://github.com/mdempsky/gocode fork according to mdempsky#46.

@VojtechVitek
Copy link

@nsf maybe https://github.com/sourcegraph/go-langserver could become the thing you're describing?

@nsf
Copy link
Owner

nsf commented Oct 3, 2018

Yes, there is such possibility.

@myitcv
Copy link
Contributor

myitcv commented Oct 3, 2018

Please see the notes from the first three sessions of the golang-tools group

https://docs.google.com/document/d/1lB49VLzDrRd3wbXP1uLf-bHQyJRmH_Dc36JeEBlK-1Q/edit

https://docs.google.com/document/d/1G7bEKWeFRjd9rPCkBJooC76CCb0Jiem5F_Q48C1zecQ/edit

As these notes confirm the Go tools team are working on such a language server.

Please join the group for further updates:

https://groups.google.com/forum/#!forum/golang-tools

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

Successfully merging this pull request may close these issues.

None yet

6 participants