]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modload: remove the Reqs function
authorBryan C. Mills <bcmills@google.com>
Fri, 20 Nov 2020 22:03:42 +0000 (17:03 -0500)
committerBryan C. Mills <bcmills@google.com>
Sat, 21 Nov 2020 03:29:37 +0000 (03:29 +0000)
commitf93ef07b1143abf3003555c4afcadc0e9842cbf8
treeaad0ee4f51ff9da490d504d6fc2f43ae582d72a7
parent3f5a97514b16c432d9699a0f1a913fabd3c0cb86
cmd/go/internal/modload: remove the Reqs function

The Reqs function returns an mvs.Reqs implemention for the global
build list. The API that it presents assumes that the build list is
globally consistent (problematic for #40775) and readily available
(problematic for #36460).

Fortunately, it is no longer used outside of the modload package.
We can instead use individual instances of the unexported mvsReqs
struct, making the dependency on the global build list more explicit.

For #36460
For #40775

Change-Id: I8674442f2a86416b0bf9c3395cb591c1e724c9d2
Reviewed-on: https://go-review.googlesource.com/c/go/+/272129
Trust: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/modload/init.go
src/cmd/go/internal/modload/load.go
src/cmd/go/internal/modload/mvs.go
src/cmd/go/internal/modload/mvs_test.go