]> Cypherpunks repositories - gostls13.git/commit
cmd/go: report original module path in error parsing replaced go.mod
authorJay Conrod <jayconrod@google.com>
Fri, 3 Apr 2020 14:42:55 +0000 (10:42 -0400)
committerJay Conrod <jayconrod@google.com>
Fri, 3 Apr 2020 17:42:31 +0000 (17:42 +0000)
commitc4f875e84e6ce3c09045fd00b72e4bb830d3e40e
tree51602818b68d3f4462e2bede372cfbd3857ddff6
parentd78639519df17bf7fb5a7facef007e90d6c0283c
cmd/go: report original module path in error parsing replaced go.mod

MVS reports an error when a go.mod file declares a module path that
doesn't match the path it was required with. If the module is a
replacement, its declared path may be the original path (preferred) or
the replacement path.

This CL makes the reported error a little more clear: the "required as"
path should be the original required path, not the replacement path.

Fixes #38220

Change-Id: I08b50a100679a447c8803cca1d1b32bc115ec1b1
Reviewed-on: https://go-review.googlesource.com/c/go/+/227097
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/mvs.go
src/cmd/go/testdata/mod/example.com_quote_v1.5.2.txt [new file with mode: 0644]
src/cmd/go/testdata/script/mod_load_replace_mismatch.txt [new file with mode: 0644]