golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.85k stars 736 forks source link

installation: refactor GOPATH/GOBIN/etc configurations #186

Open stamblerre opened 4 years ago

stamblerre commented 4 years ago

There are far too many ways to set a GOPATH in this extension. We need to centralize them and provide users with common workflows to follow. Some thoughts:

FiloSottile commented 4 years ago

For standard library development I use toolsGopath to keep separate builds of the tools in case tip introduced any incompatibility. How would that use case be handled if the option is deprecated?

stamblerre commented 4 years ago

I believe that @hyangah has discovered that the whole "Your GOROOT has changed, analysis tools may need to be recompiled" warning (which I assume is what you're referring to?) is not really valid/necessary anymore. The majority (all?) tools should still work in codebases that use different Go versions without being recompiled.

In any case, you'd still be able to set different GOBINs in different workspaces. My thinking on this whole topic is really that we should deprecate all settings and make go.toolsEnvVars the only option (maybe with a better name).