cmd/go/internal/mvs: indicate the actual version when printing a mismatched ModuleError
Previously, we suppressed the module version annotation if the last error in the stack was a *module.ModuleError, regardless of its path. However, if the error is for a replacement module, that produces a confusing error message: the error is attributed to the last module in the error path, but actually originates in the replacement (which is not otherwise indicated). Now, we print both the original and the replacement modules when they differ, which may add some unfortunate redundancy in the output but at least doesn't drop the very relevant information about replacements. Fixes #35039 Change-Id: I631a7398033602b1bd5656150a4fad4945a87ade Reviewed-on: https://go-review.googlesource.com/c/go/+/247765 Reviewed-by:Jay Conrod <jayconrod@google.com>
Loading
Please sign in to comment