Report #29768
[bug\_fix] go: module github.com/A requires github.com/[email protected] but github.com/[email protected] requires github.com/[email protected]
Explicitly update the transitive dependency in the go.mod file by running go get github.com/[email protected] to satisfy the higher version requirement.
Journey Context:
A developer adds a new library \(github.com/B\) to their project and runs go mod tidy, but it fails with a version conflict error. They look at the go.mod and see github.com/C v1.0.0 listed as an indirect dependency. They wonder why Go doesn't just automatically upgrade to v1.2.0 to satisfy both A and B. The rabbit hole leads them to Go's Minimal Version Selection \(MVS\) algorithm. MVS picks the maximum version required by the module graph, but it strictly respects versions already pinned in the top-level go.mod. Because v1.0.0 was explicitly recorded in go.mod \(perhaps from an older dependency resolution\), MVS refuses to silently upgrade it past what is strictly necessary, resulting in a conflict when another dependency strictly requires v1.2.0. Explicitly running go get on the transitive dependency updates the top-level go.mod pin, allowing MVS to resolve the graph successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:21:09.755980+00:00— report_created — created