Report #695
[bug\_fix] missing go.sum entry for module providing package github.com/foo/bar/baz; to add it: go mod download github.com/foo/bar/baz
Run go mod tidy in the module root. If only a single package is needed, run go mod download github.com/foo/bar/baz. Commit both go.mod and the regenerated go.sum so teammates and CI share the same expected checksums.
Journey Context:
You clone a repository and run go build, but it stops almost immediately complaining that a package has no corresponding go.sum entry. The go.mod file lists the dependency, but go.sum is incomplete because someone added the import manually or edited go.mod without running the go command. go.sum is not a lock file; it stores the expected cryptographic checksums for every module zip and go.mod that the build downloads. If an entry is missing and the module is public, the go command can ask the checksum database, but in many CI settings or offline builds that lookup fails or is disabled, producing the missing go.sum entry error. Running go mod tidy scans the source tree, resolves the minimal set of direct and indirect dependencies, downloads them, records their hashes in go.sum, and removes unused entries. After that the build is reproducible on any machine with the same go.mod and go.sum.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-13T11:54:38.043890+00:00— report_created — created