aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/list/list.go
diff options
context:
space:
mode:
authorChressie Himpel <chressie@google.com>2022-04-27 20:09:28 +0200
committerChressie Himpel <chressie@google.com>2022-04-27 20:09:28 +0200
commitec7f5165ddc680efbac18dc15b4905844d9e8db9 (patch)
treeeacc43345e3d6f0adfda16bfcf66e7e5096a85b9 /src/cmd/go/internal/list/list.go
parentca6fd39cf6498d4507fc7cdaced55620c283a503 (diff)
parentf0ee7fda636408b4f04ca3f3b11788f662c90610 (diff)
downloadgo-ec7f5165ddc680efbac18dc15b4905844d9e8db9.tar.gz
go-ec7f5165ddc680efbac18dc15b4905844d9e8db9.zip
[dev.boringcrypto] all: merge master into dev.boringcrypto
Change-Id: Ic5f71c04f08c03319c043f35be501875adb0a3b0
Diffstat (limited to 'src/cmd/go/internal/list/list.go')
-rw-r--r--src/cmd/go/internal/list/list.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/go/internal/list/list.go b/src/cmd/go/internal/list/list.go
index 17864e1da71..e9e0910f32a 100644
--- a/src/cmd/go/internal/list/list.go
+++ b/src/cmd/go/internal/list/list.go
@@ -568,6 +568,13 @@ func runList(ctx context.Context, cmd *base.Command, args []string) {
IgnoreImports: *listFind,
ModResolveTests: *listTest,
LoadVCS: true,
+ // SuppressDeps is set if the user opts to explicitly ask for the json fields they
+ // need, don't ask for Deps or DepsErrors. It's not set when using a template string,
+ // even if *listFmt doesn't contain .Deps because Deps are used to find import cycles
+ // for test variants of packages and users who have been providing format strings
+ // might not expect those errors to stop showing up.
+ // See issue #52443.
+ SuppressDeps: !listJsonFields.needAny("Deps", "DepsErrors"),
}
pkgs := load.PackagesAndErrors(ctx, pkgOpts, args)
if !*listE {