Commit 4828981
gopls/internal/telemetry/cmd/stacks: build compiler from root
Currently we build cmd/compile from the current directory.
Unfortunately, if the current directory happens to contain a go.mod
file, the `go` directive restricts the GOTOOLCHAINs that are allowed.
For example, gopls go.mod says `go 1.23.4`. Running stacks from its
directory is thus unable to build a compiler older than 1.23.4.
To avoid this, switch to root when building the compiler, assuming that
root won't contain a go.mod.
We can now drop GOWORK=off, as root presumably won't contain a go.work
either.
Change-Id: I6a6a636ccb6fd2b04db3352e17dc28310fc8d069
Reviewed-on: https://go-review.googlesource.com/c/tools/+/642935
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Michael Pratt <mpratt@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>1 parent 3f87563 commit 4828981
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
| 992 | + | |
| 993 | + | |
| 994 | + | |
| 995 | + | |
| 996 | + | |
992 | 997 | | |
993 | 998 | | |
994 | 999 | | |
| |||
1014 | 1019 | | |
1015 | 1020 | | |
1016 | 1021 | | |
1017 | | - | |
1018 | 1022 | | |
1019 | 1023 | | |
1020 | 1024 | | |
| |||
0 commit comments