-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Default GOPATH not respected in vim-go #1243
Labels
Comments
Hi @spf13 I'm working on this. Already fixed :GoPath and :GoInstallBinaries, however the problem is deeper than I've imagined. It needs a serious refactor. I'm now doing it. It'll be included into the next release as well. Thanks for the feedback. |
fatih
added a commit
that referenced
this issue
Mar 29, 2017
This PR fixes the following cases: * If no GOPATH is set, vim-go uses the default GOPATH via `go env GOPATH` (starting Go 1.8) * `:GoPath` now shows the correct `GOPATH` if no GOPATH is set * `:GoInstallBinaries` now installs to the correct GOPATH if no GOPATH is set fixes #1243
fatih
added a commit
that referenced
this issue
Mar 29, 2017
This PR fixes the following cases: * If no GOPATH is set, vim-go uses the default GOPATH via `go env GOPATH` (starting Go 1.8) * `:GoPath` now shows the correct `GOPATH` if no GOPATH is set * `:GoInstallBinaries` now installs to the correct GOPATH if no GOPATH is set fixes #1243
fatih
added a commit
that referenced
this issue
Mar 29, 2017
This PR fixes the following cases: * If no GOPATH is set, vim-go uses the default GOPATH via `go env GOPATH` (starting Go 1.8) * `:GoPath` now shows the correct `GOPATH` if no GOPATH is set * `:GoInstallBinaries` now installs to the correct GOPATH if no GOPATH is set fixes #1243
Fixed with #1248 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is related to #1208 but I believe the problem is more widespread.
When the environment variable $GOPATH isn't set, Go 1.8 uses $HOME/go as the default.
In Vim the function :GoPath returns this path as expected however many operations depending on the $GOPATH being set don't work properly.
Vim-go can't identify the "Go binaries" are installed and a message is provided saying they aren't installed.
GoInstallBinaries can't identify existing binaries and re-installs them every time it's run.
GoCode can't be found and many features don't work.
GoFmt can't be found and an error is returned on file save.
I'm sure there are many similar manifestations of this similar issue.
It's easy to reproduce. Simply stop exporting $GOPATH and try to use vim-go.
The text was updated successfully, but these errors were encountered: