From dcc801ef815263eae7f0780a0bbc2f2e753599b0 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 9 Apr 2021 00:13:50 -0400 Subject: [PATCH] cmd/go/internal/modload: actually set the depth field passed to newRequirements This was missed in CL 308515, and didn't show up in testing because so few codepaths (and tests) actually depend on this behavior so far. For #36460 Change-Id: I98b1962eb64d371884e15a3356c95f7ea80c7d21 Reviewed-on: https://go-review.googlesource.com/c/go/+/308810 Trust: Bryan C. Mills Run-TryBot: Bryan C. Mills TryBot-Result: Go Bot Reviewed-by: Dmitri Shuralyov --- src/cmd/go/internal/modload/buildlist.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cmd/go/internal/modload/buildlist.go b/src/cmd/go/internal/modload/buildlist.go index 24b2585a55..3fbe3c6700 100644 --- a/src/cmd/go/internal/modload/buildlist.go +++ b/src/cmd/go/internal/modload/buildlist.go @@ -105,6 +105,7 @@ func newRequirements(depth modDepth, rootModules []module.Version, direct map[st } rs := &Requirements{ + depth: depth, rootModules: rootModules, maxRootVersion: make(map[string]string, len(rootModules)), direct: direct,