]> Cypherpunks repositories - gostls13.git/commit
cmd/go: include GOEXPERIMENT flags in tool id for cache key
authorJay Conrod <jayconrod@google.com>
Mon, 15 Jul 2019 15:33:26 +0000 (11:33 -0400)
committerJay Conrod <jayconrod@google.com>
Wed, 17 Jul 2019 22:57:03 +0000 (22:57 +0000)
commit4814e7d59191e17b2d27c723220512db32374301
treea1cc9c2b9a0eabea730583a566a793fe703527c8
parentf93234ad620cc34573bca56be9fcf55c975e0821
cmd/go: include GOEXPERIMENT flags in tool id for cache key

The go command invokes each tool with -V=full to discover its version
to compute a tool id. For release versions (that don't include the
word "devel"), the go command only used the third word in
the output (e.g., "go1.13"), ignoring any toolchain experiments that
followed. With this change, the go command will use whole version line
in the tool id for release versions.

Also, when -V=full is set and there are non-default experiments,
experiments are no longer printed twice.

Fixes #33091

Change-Id: I19b96f939c7e2fbc5d8befe3659156ee4b58daef
Reviewed-on: https://go-review.googlesource.com/c/go/+/186200
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
misc/reboot/experiment_toolid_test.go [new file with mode: 0644]
src/cmd/go/internal/work/buildid.go
src/cmd/internal/objabi/flag.go