aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json
diff options
context:
space:
mode:
authorPierre Gimalac <pierre.gimalac@datadoghq.com>2026-02-03 14:25:23 +0100
committerGopher Robot <gobot@golang.org>2026-02-12 12:12:13 -0800
commitb464a924a9bdd00627cbc3baca86a0e042fccb8a (patch)
treeff51bd9af345bcdcdb0c59c711fb98bad15da4d5 /src/encoding/json
parent30d5c1b0572f7d021def277097df6a21f300995e (diff)
downloadgo-b464a924a9bdd00627cbc3baca86a0e042fccb8a.tar.xz
cmd/go: do not collect build information for test packages when not needed
When build information is not needed for go list output (when -export=false and Stale and StaleReason fields are not printed), the "SuppressBuildInfo" option is set to true, so that cmd/go/internal/load does not collect it (in particular VCS information, which is costly to compute). However the option is only checked in "PackagesAndErrors", not in "TestPackagesAndErrors", so when running go list -test=true, build information is still collected, significantly increasing the duration of the command. This CL updates TestPackagesAndErrors to check SuppressBuildInfo before calling setBuildInfo, like PackagesAndErrors does. Fixes #77419 Change-Id: I13f60d179c26d79d94899498f76ba9093566eeb6 Reviewed-on: https://go-review.googlesource.com/c/go/+/740901 Reviewed-by: Michael Matloob <matloob@google.com> Reviewed-by: Ian Alexander <jitsu@google.com> Auto-Submit: Ian Alexander <jitsu@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Sean Liao <sean@liao.dev>
Diffstat (limited to 'src/encoding/json')
0 files changed, 0 insertions, 0 deletions