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

go installed binaries not working for go v1.20 #104

Closed
Starefossen opened this issue May 14, 2023 · 1 comment
Closed

go installed binaries not working for go v1.20 #104

Starefossen opened this issue May 14, 2023 · 1 comment

Comments

@Starefossen
Copy link

Describe the bug

I am unable to get any of my go install binaries ($HOME/go/bin) to work with asdf-golang starting from version v1.20. I am probably doing something wrong, but it have worked perfectly with version prior to v1.20 and I am unable to figure this one out myself...

To Reproduce
Steps to reproduce the behavior:

$ asdf plugin update --all
$ asdf install golang 1.20.4
$ asdf global golang 1.20.4

$ go get golang.org/x/tools/gopls@latest
$ stat $HOME/go/bin/gopls
16777230 57318951 -rwxr-xr-x 1 $USER staff 0 25765874 "May 14 11:05:15 2023" "May 14 10:58:20 2023" "May 14 10:58:20 2023" "May 14 10:58:19 2023" 4096 52288 0 $HOME/go/bin/gopls

$ asdf reshim
$ gopls version
No preset version installed for command gopls
Please install a version by running one of the following:

$ asdf install golang 1.20.4
$ asdf global golang 1.19.3
$ asdf reshim

$ gopls version
gopls version
golang.org/x/tools/gopls v0.11.0
    golang.org/x/tools/gopls@v0.11.0 h1:/nvKHdTtePQmrv9XN3gIUN9MOdUrKzO/dcqgbG6x8EY=

Expected behavior

go install binaries should work with go v1.20 and reshim.

Additional context

  • go version: go version go1.20.4 darwin/arm64
  • asdf version: v0.11.3
  • go env:
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="$HOME/Library/Caches/go-build"
GOENV="$HOME/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="$HOME/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="$HOME/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="$HOME/.asdf/installs/golang/1.20.4/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="$HOME/.asdf/installs/golang/1.20.4/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20.4"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/dev/null"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rn/qhsvm_qj7dq5brrmnflj5m5c0000gn/T/go-build773786195=/tmp/go-build -gno-record-gcc-switches -fno-common"
@Starefossen
Copy link
Author

Apparently rm -rf $HOME/.asdf/shims/* and asdf reshim solved the problem 🤷🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant