cmd/go: incompatible module path check doesn't apply for gopkg.in/yaml.v2 #58721
Labels
GoCommand
cmd/go
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
go version
)?What did you do?
And run
go build
Note: the go.mod isn't tidy.
What did you expect to see?
Error related to mismatching module paths. (gopkg.in/yaml.v2 vs gopkg.in/yaml.v3)
What did you see instead?
No error.
go list sees the replacement.
go mod tidy
adds gopkg.in/yaml.v3 to indirect require group.go build
was ok as long as go.sum has an entry for v2.On the other hand,
go build
returns an error (however, not explicitly talks about this path issue)go mod tidy
update go.mod to the following without error.After that
go build
succeed. (I don't know why).But
go list -f '{{.Module}}' k8s.io/klog
reports an errorThe text was updated successfully, but these errors were encountered: