/ go Public
cmd/go: two possible canonical states when go.sum is empty, the file may or may not exist #36236
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 go1.13.5 darwin/amd64
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
Executed go build and noticed that no go.sum was generated (unexpected)
added a dummy dependency to go.mod, re-ran go build and a go.sum was generated.
removed dependency from go.mod, so it is back to original above, and re-ran go build and go mod tidy
go.sum was still there.
What did you expect to see?
(Note that this is the first time for me using go modules so my formulation might not be 100% accurate)
Either go.sum is removed or it should have been generated with the first go.build. This would give symmetric behaviour.
I would prefer that go.sum is always generated. The reason why this was a problem for me is that I used a Dockerfile template that assumed a go.sum file to be there.
What did you see instead?
BTW I entered 'go bug' to file this issue and I got a github error. Perhaps temporary problem?
The text was updated successfully, but these errors were encountered: