]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/objabi: centralize GOEXPERIMENT parsing
authorAustin Clements <austin@google.com>
Mon, 15 Mar 2021 19:43:45 +0000 (15:43 -0400)
committerAustin Clements <austin@google.com>
Thu, 18 Mar 2021 16:51:20 +0000 (16:51 +0000)
commit06ca809410649e24c1a3a079a0a859bae2d4613a
tree51c0dff0a7733cd1ae0114c5772f421027894a5b
parentb7cb92ad12e6e988ad73313773e1ca229a333005
cmd/internal/objabi: centralize GOEXPERIMENT parsing

objabi parses GOEXPERIMENT, but most of the consumers look at the raw
GOEXPERIMENT string that objabi gets from the environment. Centralize
this logic by only exposing the parsed GOEXPERIMENT value from objabi.
This sets us up for the next few changes. It also has the nice but
mostly useless property that the order of experiment names will be
canonicalized in build cache hashes.

After this, the only remaining place that looks at raw GOEXPERIMENT is
cmd/dist, which we'll fix in the next CL.

For #40724.

Change-Id: Idb150f848e17c184fae91372ca8b361591472f51
Reviewed-on: https://go-review.googlesource.com/c/go/+/302049
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
src/cmd/go/internal/cfg/cfg.go
src/cmd/go/internal/work/exec.go
src/cmd/go/internal/work/init.go
src/cmd/internal/objabi/flag.go
src/cmd/internal/objabi/util.go