]> Cypherpunks repositories - gostls13.git/commit
cmd/go: clarify error when package is removed in a module
authorJay Conrod <jayconrod@google.com>
Wed, 27 Mar 2019 00:21:21 +0000 (20:21 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 29 Mar 2019 21:25:56 +0000 (21:25 +0000)
commitee780d4a780be9d8517583bb7c3598c834b6f775
tree89d5f4956a5c1cd247564119065d29d82df32e6e
parentd8f60eea64a568b272222960eb253bfc08cfbac2
cmd/go: clarify error when package is removed in a module

If no module in the build list provides an imported package, we
try to upgrade to the "@latest" version. If there is a requirement on
a version of the module which is newer than the "@latest" version
(e.g., a prerelease or pseudoversion), we cannot upgrade further.

We previously reported "looping trying to add package" when we saw the
package in "@latest" but it was removed later. The meaning of this is
unclear for users, so with this change, we explain the package was
removed.

Fixes #30394

Change-Id: I1b7fec2c37e762fb600e66ee8a4df4aeaf13e67a
Reviewed-on: https://go-review.googlesource.com/c/go/+/169720
Run-TryBot: Jay Conrod <jayconrod@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/modload/import.go
src/cmd/go/internal/modload/load.go
src/cmd/go/testdata/mod/example.com_missingpkg_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/example.com_missingpkg_v1.0.1-beta.txt [new file with mode: 0644]
src/cmd/go/testdata/mod/example.com_usemissingpre_v1.0.0.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_missingpkg_prerelease.txt [new file with mode: 0644]