]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go/internal/modload: actually set the depth field passed to newRequirements
authorBryan C. Mills <bcmills@google.com>
Fri, 9 Apr 2021 04:13:50 +0000 (00:13 -0400)
committerBryan C. Mills <bcmills@google.com>
Fri, 9 Apr 2021 13:19:10 +0000 (13:19 +0000)
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 <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
src/cmd/go/internal/modload/buildlist.go

index 24b2585a553dd97cf95fe03b498c61a13dfc7e19..3fbe3c67005c0e06476e38050ee0aa9694117910 100644 (file)
@@ -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,