-
Notifications
You must be signed in to change notification settings - Fork 645
Tools install into open workspace if go.mod present #1919
Comments
Setting GO111MODULE to |
I've made the change to turn off GO111MODULE in the process that runs the |
@ramya-rao-a I followed the instructions and can confirm that you fix is working as intended here. |
Thanks @brunsgaard! |
The fix above still hasn't worked for me... I've also discovered that my vscode doesn't refresh the GOROOT variable (at least the path to Go bin doesn't change) until I restart my machine (Mac Seirra Os). I have opted to install all the tools using go1.10 settings and after all tools have been successfully installed is when I can now change my Go version using gvm to go1.11. The vscode works fine with all the tools installed with go1.10 setting. go1.11 settings above still doesn't work even with the beta Go extension binary beta version and Actually with the beta binaries version above, the reload button on the Go extension doesn't go away. |
After upgrading my macOS system Go to 1.11, two tools fail to install.
What's happening is that my currently open workspace has a
go.mod
file, andgo get
is run within that, causing it to both enable modules (which make the install fail) and to pollute my go.mod file.The
go get
commands that install tools should be run from$GOPATH/src
(keepinggo.toolsGopath
into account) to disable modules.See also https://github.com/golang/go/wiki/Modules#why-does-installing-a-tool-via-go-get-fail-with-error-cannot-find-main-module for more modules oriented solution.
The text was updated successfully, but these errors were encountered: