]> Cypherpunks repositories - gostls13.git/commit
cmd/go: skip computing BuildInfo in go list unless it's needed
authorMichael Matloob <matloob@golang.org>
Wed, 27 Apr 2022 20:04:28 +0000 (16:04 -0400)
committerGopher Robot <gobot@golang.org>
Wed, 4 May 2022 21:35:22 +0000 (21:35 +0000)
commitaeb933d3ffa1cba614baf21849715bed4145dcd4
treeb1e37a095296ac5ac8e80cf4da6dc91b22cdda9a
parent2f23364340750fc96afc38cd28c71117f916f23b
cmd/go: skip computing BuildInfo in go list unless it's needed

The only fields of the go list output that require BuildInfo to be
computed are the Stale and StaleReason fields. If a user explicitly
requests JSON fields and does not ask for Stale or StaleReason, skip
the computation of BuildInfo.

For #29666

Change-Id: Ie77581c44babedcb5cb7f3dc7d6ed1078b56eee4
Reviewed-on: https://go-review.googlesource.com/c/go/+/402736
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Michael Matloob <matloob@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
src/cmd/go/internal/list/list.go
src/cmd/go/internal/load/pkg.go
src/cmd/go/testdata/script/list_json_fields.txt