Report #58059
[bug\_fix] go: module example.com/A requires example.com/[email protected] but example.com/[email protected] is required
Run \`go get example.com/[email protected]\` to explicitly upgrade the direct dependency, or run \`go mod tidy\` to reconcile the requirements.
Journey Context:
A developer adds a new dependency \(example.com/A\) to their project and runs \`go build\`. The build fails with a version conflict error, indicating that the new dependency requires example.com/[email protected], but their go.mod explicitly requires example.com/[email protected]. The developer tries deleting go.sum, but the error persists. The root cause is that the go.mod file has an explicit \`require\` directive for v1.1.0, and Go's minimal version selection algorithm cannot automatically downgrade a direct requirement to satisfy an indirect one without instruction. The fix is to run \`go get example.com/[email protected]\` to explicitly tell the toolchain to use the higher version \(which is backward compatible\), or run \`go mod tidy\` to clean up and reconcile the direct and indirect dependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T03:56:40.554534+00:00— report_created — created