aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/work/build.go
diff options
context:
space:
mode:
authorBryan C. Mills <bcmills@google.com>2020-11-19 13:26:51 -0500
committerBryan C. Mills <bcmills@google.com>2020-11-20 15:19:09 +0000
commit8bbd8294d01b66bf47514dee94d3c4341566e357 (patch)
treee8dfd77e63ef7aabab0e3736d64a17e3a7319947 /src/cmd/go/internal/work/build.go
parent66c02645062561ac29d00297e8d8c49698b2e4da (diff)
downloadgo-8bbd8294d01b66bf47514dee94d3c4341566e357.tar.gz
go-8bbd8294d01b66bf47514dee94d3c4341566e357.zip
cmd/go/internal/work: remove a redundant call to modload.LoadedModules
The modload.EditBuildList call added in CL 270980 already ensures that installMod does not require a newer version of itself, so the condition that this loop is checking for is redundant. (I had meant for this change to be included in CL 270980, but apparently somehow reverted it prior to mailing.) For #36460 Change-Id: I4dd746b927f7012d950187cac9c510cd6fec8fd9 Reviewed-on: https://go-review.googlesource.com/c/go/+/271646 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Jay Conrod <jayconrod@google.com> Trust: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/work/build.go')
-rw-r--r--src/cmd/go/internal/work/build.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/cmd/go/internal/work/build.go b/src/cmd/go/internal/work/build.go
index e0aa691659..ca88f0efa1 100644
--- a/src/cmd/go/internal/work/build.go
+++ b/src/cmd/go/internal/work/build.go
@@ -840,11 +840,6 @@ func installOutsideModule(ctx context.Context, args []string) {
}
// Check that named packages are all provided by the same module.
- for _, mod := range modload.LoadedModules() {
- if mod.Path == installMod.Path && mod.Version != installMod.Version {
- base.Fatalf("go install: %s: module requires a higher version of itself (%s)", installMod, mod.Version)
- }
- }
for _, pkg := range mainPkgs {
if pkg.Module == nil {
// Packages in std, cmd, and their vendored dependencies