Report #71173
[bug\_fix] go: github.com/foo/[email protected] requires github.com/baz/[email protected]: missing go.sum entry; to add it: go mod download github.com/baz/qux
Run \`go mod tidy\` to recalculate and add missing transitive dependencies to go.sum, then commit the updated go.sum file.
Journey Context:
A developer adds a new direct dependency using \`go get github.com/foo/bar\`. They write code, it compiles locally, and they commit the go.mod but forget to commit go.sum \(or their VCS ignores it\). A teammate pulls the code and runs \`go build\`, getting a missing go.sum entry error for a transitive dependency they never directly imported. The teammate tries \`go get github.com/baz/qux\`, which temporarily fixes it but leaves the project in a messy state. The root cause is that go.sum maintains the cryptographic checksums of all direct and indirect dependencies. When go.sum is out of sync with go.mod, the toolchain refuses to build to ensure supply chain security. \`go mod tidy\` works because it prunes unused dependencies and adds missing transitive dependencies, perfectly synchronizing 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-21T02:02:33.392171+00:00— report_created — created