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

When using gb, extension should not rely on go to build or regular gopath #1679

Closed
NobbZ opened this issue May 15, 2018 · 3 comments
Closed

Comments

@NobbZ
Copy link

NobbZ commented May 15, 2018

According to a short dialogue with @ramya-rao-a about "go.gocodePackageLookupMode": "gb" we learnt, that this setting will only affect intellisense and completion for items contained in gbs vendor folder.

But if the GOPATH is otherwise empty, import statements will have a lot of error markings in them, because still go build is used to check for compile errors, while in a gb project it seems as if one has to use gb build all.

Also gb projects seem to usually live outside of the GOPATH and actually mirror it in a very weird way.

Currently it seems as if developers using gb with vscode-go need to workaround this pay applying a workspace setting like this: "go.gopath": "${workspaceRoot}:${workspaceRoot}/vendor" (maybe add regular gopath as well).


disclaimer:

I do not use gb myself, but after there were some questions around it over the last weeks, I did some quick research and discovered these potential discrepancies in supporting it.

@ramya-rao-a asked me to file a bug report in gitter.im/Microsoft/vscode-go with what I have learnt such that some one else who is more knowledgable about gb can add necessary information.

@ramya-rao-a
Copy link
Contributor

Thanks for logging this @NobbZ and for all the details.
Let's keep this open for a while to see if anyone using gb can chime in

@ramya-rao-a ramya-rao-a changed the title package lookup mode should not rely on go to build or regular gopath When using gb, extension should not rely on go to build or regular gopath May 15, 2018
@jlindsey
Copy link

I do not use gb anymore, having switched to wgo which is a similar project. It looks to me like #1297 should fix this, or some more general config like go.buildTool.

@ramya-rao-a
Copy link
Contributor

Closing this issue as we haven't gotten any other feedback using gb with this extension.
Moving forward, if support for gb is indeed needed, then the language server should be the right place for it

@vscodebot vscodebot bot locked and limited conversation to collaborators Aug 20, 2019
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

3 participants