Commit c3faff7f authored by Bryan C. Mills's avatar Bryan C. Mills
Browse files

cmd/go/internal/modload: change mvsReqs to store roots instead of a full build list

The mvsReqs implementation has always been a bit ambivalent about
whether the root requirements return the full build list, just the
direct requirements, or some hybrid of the two.

However, a full build list always requires the Target module as the
first entry, and it's easer to remove a redundant leading element from
a slice than to add one. Changing the mvsReqs field to contain
arbitrary roots instead of a full build list eliminates the need to
add redundant elements, at the cost of needing to remove redundant
elements in more places.

For #36460

Change-Id: Idd4c2d6bc7b66f67680037dab1fb9c2d1b40ab93
Reviewed-on: https://go-review.googlesource.com/c/go/+/308811


Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
Reviewed-by: default avatarMichael Matloob <matloob@golang.org>
Reviewed-by: default avatarJay Conrod <jayconrod@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
parent 814c5ff1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment