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

installation: refactor GOPATH/GOBIN/etc configurations #186

Open
stamblerre opened this issue Jun 8, 2020 · 2 comments
Open

installation: refactor GOPATH/GOBIN/etc configurations #186

stamblerre opened this issue Jun 8, 2020 · 2 comments

Comments

@stamblerre
Copy link
Contributor

stamblerre commented Jun 8, 2020

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:

  • We should deprecate go.toolsGopath for Go versions over 1.11. Modules renders the reasoning behind this setting obsolete.
  • We should figure out what to do with go.gopath vs. setting GOPATH in go.toolsEnvVars. Which one overrides the other? I have no idea what happens right now.
  • What happens if a user sets GOBIN in go.toolsEnvVars?
  • We should decide if go.inferGopath makes sense in a modules world.
  • We should prioritize binaries on a user's PATH and only fallback to GOPATH/bin or GOBIN if the binary is not on the PATH.
@FiloSottile
Copy link
Contributor

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
Copy link
Contributor Author

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).

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

No branches or pull requests

3 participants