Report #86963
[bug\_fix] cargo: failed to select a version for \`serde\`
Run \`cargo update -p serde\` to refresh the lockfile within the declared version constraints, or edit \`Cargo.toml\` to reconcile incompatible semver requirements across dependencies; if a transitive dependency demands an exact yanked version, pin an alternative compatible version with \`\[patch.crates-io\]\` or a direct dependency override.
Journey Context:
You add a new crate to Cargo.toml and \`cargo build\` suddenly reports that cargo cannot pick a version for a popular transitive dependency. You check \`Cargo.lock\` and see multiple entries for the same crate, or a dependency that requires \`>=1.0.200\` while another pins \`=1.0.150\`. You try deleting \`Cargo.lock\` and rebuilding, which sometimes works for minor drift but fails when the constraints are truly incompatible. The root cause is Cargo's SAT-style resolver: it must find one version per crate that satisfies every dependency edge, and a yanked or overly restrictive requirement can make the graph unsatisfiable. The fix works because it either relaxes the constraints, moves the lockfile to a resolvable set, or explicitly overrides the problematic dependency version.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T04:33:26.261547+00:00— report_created — created