commit | a5c79283f79b5f03296fc2037f32d935aaec806f | [log] [tgz] |
---|---|---|
author | Michael Matloob <matloob@golang.org> | Mon Apr 03 16:07:41 2023 -0400 |
committer | Michael Matloob <matloob@golang.org> | Mon Apr 10 20:27:52 2023 +0000 |
tree | 474a12fd524f7f6f0257f1e2cbd81e78c515e8a2 | |
parent | df6396fc22823e9ab666d2d06c86f219d5129926 [diff] |
cmd/go: return and handle errors from loadImport for bad imports And assign the error to the importing package. Before this change, for some errors for bad imports, such as importing a vendored package with the wrong path, we would make a dummy package for the imported package with the error on it. Instead report the error on the importing package where it belongs. Do so by returning an error from loadImport and handling it on the importing package. For #59157 Change-Id: I952e1a82af3857efc5da4fd3f8bc6be473a60cf5 Reviewed-on: https://go-review.googlesource.com/c/go/+/482877 Reviewed-by: Bryan Mills <bcmills@google.com> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.
Gopher image by Renee French, licensed under Creative Commons 4.0 Attributions license.
Our canonical Git repository is located at https://go.googlesource.com/go. There is a mirror of the repository at https://github.com/golang/go.
Unless otherwise noted, the Go source files are distributed under the BSD-style license found in the LICENSE file.
Official binary distributions are available at https://go.dev/dl/.
After downloading a binary release, visit https://go.dev/doc/install for installation instructions.
If a binary distribution is not available for your combination of operating system and architecture, visit https://go.dev/doc/install/source for source installation instructions.
Go is the work of thousands of contributors. We appreciate your help!
To contribute, please read the contribution guidelines at https://go.dev/doc/contribute.
Note that the Go project uses the issue tracker for bug reports and proposals only. See https://go.dev/wiki/Questions for a list of places to ask questions about the Go language.