cmd/go: replace
directive causes unexpected changes to module sums and vendored packages
#40119
Labels
replace
directive causes unexpected changes to module sums and vendored packages
#40119
What version of Go are you using (
go version
)?&&
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
go mod tidy
&go mod vendor
go.mod
file with the exact same version/rev as the currently required module.go mod tidy
&go mod vendor
What did you expect to see?
I expected no major diffs and any diff in
go.sum
that did exist would not trigger a change to a vendored package.What did you see instead?
go.sum
fileI have create a repo here: [https://github.com/jtlisi/go_modules_replace_behaviour]. This repo documents the issue I'm experiencing in the README with copies of the diffs. This repo can also be downloaded and the above steps can be run to replicate the issue.
I'm not sure if this is expected behavior for the
replace
directive andgo mod
. If so I would appreciate it if someone could help me understand how I can avoid these large diffs when adding a replace directive that does not feature any changes.The text was updated successfully, but these errors were encountered: