Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extension/src/util: do not use cached go version with GOTOOLCHAIN
CL 577095 https://go-review.googlesource.com/c/vscode-go/+/577095 made a change to compute the go version used for tools installation using `GOTOOLCHAIN=local go version`. However, that's not sufficient. There is a go version cache (cachedGoVersion) and if the go binary path is same, getGoVersion uses the cachedGoVersion. But after go1.21 this assumption doesn't hold because the same go binary can return different go version depending on its toolchain switch mode. For now, skip caching if getGoVersion is called with non-default GOTOOLCHAIN param. We use this mode of getGoVersion only during tool installation, which is supposed to be rare. For #3168 Change-Id: Id33536d70b74afee592e4a98bd59865e41dbea49 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/583975 Commit-Queue: Hyang-Ah Hana Kim <hyangah@gmail.com> kokoro-CI: kokoro <noreply+kokoro@google.com> Reviewed-by: Suzy Mueller <suzmue@golang.org>
- Loading branch information