-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: "go mod tidy" removes an entry added to go.sum by "go build" for a replacement module #27176
Comments
CC @bcmills |
Seeing this in two separate projects that have a edit: running |
Thanks for the repository for use in reproducing the problem. Even when you send such a repo, though, it is very helpful to also send a transcript with exact commands and outputs that you are seeing. It may well be that we run with a slightly different version of the tools or a different environment and don't get the same behavior, and we'd have no way of knowing. So please be more precise in the "what did you see" answer. |
This issue is probably related to/dup of #27868. There is a repro listed in #27868 (comment) |
Here you go:
|
I'm going to close this as a dup of #27868 |
What version of Go are you using (
go version
)?1.11rc2
What operating system and processor architecture are you using (
go env
)?What did you do?
Added a
replace
directive for a module.go build
adds an entry for this replacement module togo.sum
.go mod tidy
removes the entry from this replacement module.Reproducer: https://github.com/misha-tectonic/go-mod-tidy-remove-replace-sum
Try
go build .
, seego.sum
changed, thengo mod tidy
.What did you expect to see?
go mod tidy
does not remove entries added bygo build .
What did you see instead?
go mod tidy
removes entries added bygo build .
.The text was updated successfully, but these errors were encountered: