-
Notifications
You must be signed in to change notification settings - Fork 758
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
gocode-gomod is installed in a wrong directory when GOPATH has multiple elements #368
Comments
gocode
fails to install while GOPATH holds multiple valuesgocode
fails to install while GOPATH holds multiple paths
There is a bug in the However, if you are using the language server, you shouldn't need to have |
Hi @stamblerre, Thanks for your quick answer! I just looked back at result I encountered, I think there might be 2 problems:
But maybe I missed something and both are related. |
gocode
fails to install while GOPATH holds multiple paths
Yep, I agree that there might be a general issue with tool installation - we'll take a look. But I do want to reiterate my earlier point that, if you're using the language server (which you are, based on your settings), there's no need to have |
Thanks again! Point duly noted 🙂 |
The message is misleading. vscode-go/src/goInstallTools.ts Line 115 in c25288b
The actual installation is done by the |
Change https://golang.org/cl/243282 mentions this issue: |
If GOPATH has multiple elements, the current message that simply appends 'bin' at the end is misleading. Tested manually by providing go.toolsGopath with multiple elements. `go get` installed the binaries in the bin directory of the first element. Update #368 Change-Id: I4dcc87b9fe22f024fcf3fe8c452243eb66d17a15 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/243282 Reviewed-by: Rebecca Stambler <[email protected]>
The thing is at some point it used the whole
Other tools were installed at the right location |
@vbatoufflet Ah, right. For |
Change https://golang.org/cl/243417 mentions this issue: |
What version of Go, VS Code & VS Code Go extension are you using?
go version
to get version of Gocode -v
orcode-insiders -v
to get version of VS Code or VS Code Insiders17299e413d5590b14ab0340ea477cdd86ff13daf
x64
go env
to get the go development environment detailsGOARCH="amd64"
GOBIN=""
GOCACHE="/Users/vincent/Library/Caches/go-build"
GOENV="/Users/vincent/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/vincent/.opt/lib/go:/Users/vincent/Development/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.14.5/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.14.5/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_r/hqcn896x7jx91ckb9kxr5scm0000gn/T/go-build425580244=/tmp/go-build -gno-record-gcc-switches -fno-common"
Share the Go related settings you have added/edited
Describe the bug
Beginning with
v0.15.0
, the extension is unable to installgocode
, giving the following error:It only seem to happen when
GOPATH
hold multiple entries, ignoring the:
separator. The file being installed at/Users/vincent/.opt/lib/go:/Users/vincent/Development/go/bin/gocode-gomod
instead of/Users/vincent/.opt/lib/go/bin/gocode-gomod
.ℹ️ The
gocode
install works onv0.14.4
.Steps to reproduce the behavior:
The text was updated successfully, but these errors were encountered: