Report #1294
[bug\_fix] go: missing go.sum entry for module providing package example.com/somepkg
Run \`go mod tidy\` to synchronize the go.mod and go.sum files with the actual imports in the codebase, or run \`go get example.com/somepkg\` to fetch the missing checksum.
Journey Context:
A developer pulls the latest code from version control, which includes a new import added by a colleague. They run go build and get an error about a missing go.sum entry. They are confused because they thought Go automatically fetches dependencies. In Go 1.15 and earlier, go build automatically updated go.mod and go.sum. However, starting in Go 1.16, go build runs with -mod=readonly by default, meaning it refuses to modify go.mod or go.sum. This change was made to ensure reproducible builds and prevent unexpected dependency mutations. The developer must explicitly run go mod tidy or go get to download the new dependency and record its cryptographic hash in go.sum before building.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-14T15:38:04.176442+00:00— report_created — created