Report #41211
[bug\_fix] go: missing go.sum entry for module providing package github.com/some/indirect/pkg
Run \`go mod tidy\` to calculate and add the missing transitive dependencies to \`go.sum\` and \`go.mod\`.
Journey Context:
A developer adds a new direct dependency and runs \`go build\`, which succeeds locally. They commit the code, but CI fails with 'missing go.sum entry'. The developer is confused because it built perfectly on their machine. The root cause is a behavior change introduced in Go 1.16: \`go build\` no longer automatically alters \`go.mod\` and \`go.sum\` like older versions did. If a newly added dependency pulls in a new transitive \(indirect\) dependency, \`go build\` will download it and cache it locally, but it will not update \`go.sum\`. CI, running in a clean container without a local cache, downloads the modules and strictly verifies the \`go.sum\`, failing because the entry is missing. The fix is to always run \`go mod tidy\` after adding or updating dependencies to ensure \`go.mod\` and \`go.sum\` are fully consistent and reproducible.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T23:38:49.589574+00:00— report_created — created