rust-lang/cargo · error
Detected changes in these crates but no version bump found:
Error message
Detected changes in these crates but no version bump found:
{entries}
Please bump at least one patch version in each corresponding Cargo.toml. What it means
xtask-bump-check compares crate changes against version bumps in Cargo.toml. If it detects source changes in a crate whose version was not incremented relative to the base commit, it bails listing the offending crates and instructs to bump at least a patch version. This enforces release hygiene in the Cargo monorepo.
Source
Thrown at crates/xtask-bump-check/src/xtask.rs:182
tracing::trace!("skipping {pkg_name}, may be removed or not published");
continue;
};
if changed_member.version() <= referenced_member.version() {
needs_bump.push(*changed_member);
}
}
}
if !needs_bump.is_empty() {
needs_bump.sort();
needs_bump.dedup();
let mut msg = String::new();
msg.push_str("Detected changes in these crates but no version bump found:\n");
for pkg in needs_bump {
writeln!(&mut msg, " {}@{}", pkg.name(), pkg.version())?;
}
msg.push_str("\nPlease bump at least one patch version in each corresponding Cargo.toml.");
anyhow::bail!(msg)
}
if github {
println!("::endgroup::");
}
if let Some(referenced_commit) = referenced_commit.as_ref() {
if github {
println!("::group::SemVer Checks against {}", referenced_commit.id());
}
let mut cmd = ProcessBuilder::new("cargo");
cmd.arg("semver-checks")
.arg("--workspace")
.arg("--baseline-rev")
.arg(referenced_commit.id().to_string());
for krate in crates_not_checked {
cmd.args(&["--exclude", krate]);
}
for krate in crates_not_check_against_channels {View on GitHub (pinned to eb98b54bc9)
Solutions
- Increment the patch (or minor/major) version in the changed crate's Cargo.toml.
- If the change should not trigger a release (e.g. test-only/docs), confirm the diff scope excludes release-relevant files or adjust the check's ignore rules.
- Re-run `cargo bump-check` to confirm all listed crates are resolved.
Example fix
// before # Cargo.toml version = "1.2.3" # after source edits // after version = "1.2.4"
Defensive patterns
Strategy: validation
Validate before calling
// Pre-flight: diff changed crates vs their Cargo.toml versions locally
for c in changed_crates {
if !version_bumped(&c) {
eprintln!("bump patch in {}", c);
}
} Type guard
null
Try / catch
null
Prevention
- Bump the patch version in the same commit that changes a crate's source.
- Run `cargo bump-check` locally before pushing.
- Add a pre-commit hook reminding to bump.
When it happens
Trigger: Running `cargo bump-check` (the xtask) on a branch where a crate's source files changed but its Cargo.toml version stayed the same compared to the referenced (base) commit.
Common situations: Forgetting to bump version after a bug fix; modifying shared code without bumping the owning crate; large PRs where version bumps get dropped in rebase.
Related errors
- could not find `base-sha` for `{UPSTREAM_BRANCH}`, pass it i
- Could not find typos version in workflow
- The lints documentation is out-of-date. Run `cargo lint-docs
- argument for --color must be auto, always, or never, but fou
- argument for --color must be auto, always, or never, but fou
AI-assisted analysis of rust-lang/cargo@eb98b54bc9 (2026-08-11).
Data as JSON: /api/errors/f8334a51e1485306.
Report an issue: GitHub.