From 94ddb2d6217e3d031cfacb8eed68786df9227bf1 Mon Sep 17 00:00:00 2001 From: "Bryan C. Mills" Date: Fri, 6 Dec 2019 15:40:04 -0500 Subject: [PATCH] cmd/go/internal/modload: revert duplicate path suppression in modload.ImportMissingError MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit CL 210338 suppressed duplication for import paths mentioned in an ImportMissingError. Unfortunately, that broke one of the cases in cmd/go/internal/modload.TestImport, and the new error message is still kind of awkward anyway. Let's revert that part of the change — we can try again with more coverage for that case. Updates #35986 Change-Id: Ib0858aec4f89a7231e32c35ec876da80d80f2098 Reviewed-on: https://go-review.googlesource.com/c/go/+/210342 Run-TryBot: Bryan C. Mills TryBot-Result: Gobot Gobot Reviewed-by: Jay Conrod --- src/cmd/go/internal/modload/import.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/cmd/go/internal/modload/import.go b/src/cmd/go/internal/modload/import.go index c7508d1702..9ae2900e46 100644 --- a/src/cmd/go/internal/modload/import.go +++ b/src/cmd/go/internal/modload/import.go @@ -42,9 +42,6 @@ func (e *ImportMissingError) Error() string { if search.IsStandardImportPath(e.Path) { return fmt.Sprintf("package %s is not in GOROOT (%s)", e.Path, filepath.Join(cfg.GOROOT, "src", e.Path)) } - if i := load.ImportPathError(nil); errors.As(e.QueryErr, &i) { - return fmt.Sprintf("cannot find module: %v", e.QueryErr) - } if e.QueryErr != nil { return fmt.Sprintf("cannot find module providing package %s: %v", e.Path, e.QueryErr) } -- 2.50.0