cmd/go: don't construct module version info if there are import errors
A precondition of modload.PackageBuildInfo is that its path and deps arguments correspond to paths that have been loaded successfully with modload.ImportPaths or one of the Load functions. load.Package.load should not call PackageBuildInfo if there were any errors resolving imports. Fixes #34393 Change-Id: I107514f1c535885330ff266c85d3981b71b31c2d Reviewed-on: https://go-review.googlesource.com/c/go/+/196520 Run-TryBot: Jay Conrod <jayconrod@google.com> Reviewed-by: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Showing
Please register or sign in to comment