go-langserver icon indicating copy to clipboard operation
go-langserver copied to clipboard

Support for versioned go

Open pwaller opened this issue 7 years ago • 5 comments

Versioned go has recently landed in tip. It would be awesome if go-langserver supported it :)

By the way, there is an effort going on over in golang.org/x/tools/go/packages to aid in supporting this, too.

pwaller avatar Jul 13 '18 18:07 pwaller

Hopefully we can get away with just the libraries we rely on being updated. Although, if I am not mistaken we have some code which makes assumptions about how code is laid out w.r.t. GOPATH. That will certainly need updating.

Thanks for the link to go/packages. I was following along when it was a CL, and it looks very appropriate to use in go-langserver.

keegancsmith avatar Jul 16 '18 13:07 keegancsmith

Will this commit help go-langserver to GoToDef without having to change anything? https://github.com/golang/go/commit/f85125345cc5d3eb054c90bfca4bda3544d7fcab

marwan-at-work avatar Jul 28 '18 17:07 marwan-at-work

To be honest I am not sure. For our "slower" gotodef it probably does help. For our faster "godef" version I think it is less likely to help.

keegancsmith avatar Jul 30 '18 12:07 keegancsmith

@keegancsmith can you possibly show me where in the code I can make the quickest implementation of vgo support? Would love to get this working with vscode

marwan-at-work avatar Aug 06 '18 20:08 marwan-at-work

@marwan-at-work Master now has all dependencies updated, including recent changes to golang.org/x/tools. That might just get it to work. However, we still have code which inspects stuff based on GOPATH, which is optional to use in go1.11 I believe. https://sourcegraph.com/search?q=repo:%5Egithub%5C.com/sourcegraph/go-langserver%24+file:%5Elangserver/+gopath

We have quite a comprehensive test suite. My best suggestion is submitting a test case which should work with gomodules, but doesn't. That would at least help motivate others to fix / if you wanted to fix should make it somewhat more straightforward to fix.

keegancsmith avatar Aug 07 '18 10:08 keegancsmith