-
Notifications
You must be signed in to change notification settings - Fork 752
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
tools: use go install
to install tools with go1.18
#1825
Comments
Change https://golang.org/cl/355974 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Oct 19, 2021
`go install` with the version specifier is THE way to install a binary in recent versions of Go. From go1.18, `go get` will not do build & install so shouldn't be used. For `dlv-dap` or `gocode-gomod`, we use `go get` + `go build` because `go install` does not allow to specify output path. (golang/go#44469) Use of `go install` allows us to address another issue: we no longer require a dummy main module in a temp directory, and we can run it from the workspace directory. The use of temp directory broke direnv, asdf users who configured their go to pick a different version of go based on the directory. Thus, we pinned the go binary by selecting the go binary from the current GOROOT's bin directory. Unfortunately, that broke another group of users who are using GOROOT for different purpose. (#1691) Now we can remove the hack to pin the go binary and use the go binary path as it is, and simplifies the installation logic. Reduced the verbose logging printed in the console. Instead, we log the command and the directory path so users could reproduce. In case of errors, the exception still includes all the stdout and stderr. Updates #1825 Change-Id: Idb1604e4484cd73832c24c0077220f8cc57dfaa0 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/355974 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Suzy Mueller <suzmue@golang.org>
Change https://golang.org/cl/359397 mentions this issue: |
gopherbot
pushed a commit
that referenced
this issue
Oct 28, 2021
GitHub Action workflows had tool installation commands defined in .yml file while Kokoro CI used a bash script. This change made them to share the same logic. Instead of using the existing build/all.bash script, this CL reimplemented the installation logic in go - to have one single program for all platforms (linux, windows, mac) - to implement complex logic that switches between go get and go install depending on the go version (versioned binary installation using go install became available only after 1.16. Updates #1825 Change-Id: I295856e7d2bdd2d1fc07efc1e794eccb42b55ad6 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/359397 Trust: Hyang-Ah Hana Kim <hyangah@gmail.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: Suzy Mueller <suzmue@golang.org>
will ping cloud shell and github codespaces team once go1.18 rc is cut. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Tools used by vscode-go are installed using
go get
- with Go 1.18,go get
won't build or install binaries.See golang/go#43684 for details.
This extension and containers that set up environments for this extension need to be updated prior to Go 1.18 release.
installTool
to change the installation method based on users' Go version. CL 355974The text was updated successfully, but these errors were encountered: