aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/modload/modfile.go
diff options
context:
space:
mode:
authorJay Conrod <jayconrod@google.com>2020-11-13 17:14:46 -0500
committerJay Conrod <jayconrod@google.com>2020-11-20 16:23:19 +0000
commit012efc67f280d7a68dd30a3150acd50cfa12985b (patch)
treef99695b773b6ae9eeec21756f06f8d381f9fb069 /src/cmd/go/internal/modload/modfile.go
parent9264067a41d98d0500036c2279dea252d1f9adac (diff)
downloadgo-012efc67f280d7a68dd30a3150acd50cfa12985b.tar.gz
go-012efc67f280d7a68dd30a3150acd50cfa12985b.zip
cmd/go/internal/modload: ignore selected version in checkRetractions
Fixes #42601 Change-Id: I58d817ed34ccbd39591326c4bc23569f94028412 Reviewed-on: https://go-review.googlesource.com/c/go/+/272006 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Jay Conrod <jayconrod@google.com>
Diffstat (limited to 'src/cmd/go/internal/modload/modfile.go')
-rw-r--r--src/cmd/go/internal/modload/modfile.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/go/internal/modload/modfile.go b/src/cmd/go/internal/modload/modfile.go
index e9601c3e7c..ede07be4bf 100644
--- a/src/cmd/go/internal/modload/modfile.go
+++ b/src/cmd/go/internal/modload/modfile.go
@@ -114,9 +114,9 @@ func CheckRetractions(ctx context.Context, m module.Version) error {
// Find the latest version of the module.
// Ignore exclusions from the main module's go.mod.
- // We may need to account for the current version: for example,
- // v2.0.0+incompatible is not "latest" if v1.0.0 is current.
- rev, err := Query(ctx, path, "latest", Selected(path), nil)
+ const ignoreSelected = ""
+ var allowAll AllowedFunc
+ rev, err := Query(ctx, path, "latest", ignoreSelected, allowAll)
if err != nil {
return &entry{nil, err}
}