Skip to content

Commit c9ef861

Browse files
dmitshurgopherbot
authored andcommitted
gopls/internal/telemetry/cmd/stacks: don't forward GOEXPERIMENT from env
The test being executed may have some GOEXPERIMENT set. When invoking another go toolchain, since GOTOOLCHAIN is set to a different version that might be older and not support the same GOEXPERIMENT values, let it run with its own default experiments. Fixes golang/go#71260. Change-Id: Iadea59fbd8bf7a11e636208567ca0fd23cdb7fa1 Cq-Include-Trybots: luci.golang.try:x_tools-gotip-linux-amd64-longtest Reviewed-on: https://go-review.googlesource.com/c/tools/+/641859 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Alan Donovan <[email protected]>
1 parent 0933021 commit c9ef861

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

gopls/internal/telemetry/cmd/stacks/stacks.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,7 @@ func readPCLineTable(info Info, stacksDir string) (map[string]FileLine, error) {
10111011
cmd.Dir = buildDir
10121012
cmd.Env = append(os.Environ(),
10131013
"GOTOOLCHAIN="+info.GoVersion,
1014+
"GOEXPERIMENT=", // Don't forward GOEXPERIMENT from current environment since the GOTOOLCHAIN selected might not support the same experiments.
10141015
"GOOS="+info.GOOS,
10151016
"GOARCH="+info.GOARCH,
10161017
"GOWORK=off",
@@ -1026,6 +1027,7 @@ func readPCLineTable(info Info, stacksDir string) (map[string]FileLine, error) {
10261027
cmd.Stderr = os.Stderr
10271028
cmd.Env = append(os.Environ(),
10281029
"GOTOOLCHAIN="+info.GoVersion,
1030+
"GOEXPERIMENT=", // Don't forward GOEXPERIMENT from current environment since the GOTOOLCHAIN selected might not support the same experiments.
10291031
"GOOS="+info.GOOS,
10301032
"GOARCH="+info.GOARCH,
10311033
)

0 commit comments

Comments
 (0)