diff options
author | Bryan C. Mills <bcmills@google.com> | 2021-04-15 16:54:41 -0400 |
---|---|---|
committer | Bryan C. Mills <bcmills@google.com> | 2021-04-21 04:26:11 +0000 |
commit | 69c94ad55f9bf3072a5ad466b779e1427a3a07e0 (patch) | |
tree | 5c887e2124781bf55b8a0f917a84a039a7e154f5 /src/cmd/go/internal/modload/init.go | |
parent | 81fcb18df5557943a80d27f248de43968e048aae (diff) | |
download | go-69c94ad55f9bf3072a5ad466b779e1427a3a07e0.tar.gz go-69c94ad55f9bf3072a5ad466b779e1427a3a07e0.zip |
cmd/go/internal/modload: split updateRoots into separate functions for updating and tidying
In CL 293689, I fused the mvs.Reqs calls that were formerly in MinReqs
and TidyBuildList into a single function, updateRoots, in the hope
that it expressed a fundamental operation. As I have been working on
the lazy equivalents, I have come to realize that these functions are
deeply related but fundamentally different.
In order to help me reason about the two different roles, I am making
the two functions separate once more, but leaving them colocated in
the code.
For #36460
Change-Id: I851d6d81fbfd84f39411e0d076ee72a9909c60ee
Reviewed-on: https://go-review.googlesource.com/c/go/+/310629
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/init.go')
-rw-r--r-- | src/cmd/go/internal/modload/init.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/go/internal/modload/init.go b/src/cmd/go/internal/modload/init.go index 953419a718..238e471c54 100644 --- a/src/cmd/go/internal/modload/init.go +++ b/src/cmd/go/internal/modload/init.go @@ -691,7 +691,7 @@ func requirementsFromModFile(ctx context.Context, f *modfile.File) *Requirements for _, n := range mPathCount { if n > 1 { var err error - rs, err = updateRoots(ctx, rs.depth, rs.direct, nil, rs) + rs, err = updateRoots(ctx, rs.direct, rs) if err != nil { base.Fatalf("go: %v", err) } |