Report #48864
[bug\_fix] go: github.com/example/[email protected]: missing go.sum entry; to add it: go mod download github.com/example/indirect-pkg
Run go mod tidy to recalculate the dependency graph and append the missing cryptographic checksums for all direct and indirect dependencies to the go.sum file.
Journey Context:
A developer updates a direct dependency in go.mod manually or via go get, which introduces a new transitive \(indirect\) dependency. They commit the go.mod change but forget to commit the updated go.sum. In the CI pipeline, the build fails with missing go.sum entry. The developer tries running the suggested go mod download command, but it fails with the same error. They might try go build, but since Go 1.16, the build toolchain operates in read-only module mode by default and refuses to modify go.sum. The root cause is that go.sum must contain the hashes of all dependencies to guarantee reproducible, verified builds. go mod tidy is the canonical way to synchronize the go.sum file with the exact requirements dictated by go.mod and the source code imports.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T12:30:09.079789+00:00— report_created — created