vectordotdev/vector · error
is out of date. Run `cargo vdev deprecation generate` and…
Error message
{} is out of date. Run `cargo vdev deprecation generate` and commit the result. What it means
Thrown by `cargo vdev deprecation check` when the on-disk generated deprecations JSON differs from what `deprecation::rendered_json` would render from the current fragments. The checked-in JSON is a generated artifact and must be kept in sync.
Solutions
- Run `cargo vdev deprecation generate` and commit the regenerated JSON file.
- If you hand-edited the JSON, revert it and edit the source .md fragments instead.
- After resolving merge conflicts, re-run generate to ensure the JSON matches the merged fragments.
- Verify file line endings/whitespace were not altered, since comparison is exact string equality.
Example fix
# before git commit -m "add fragment" # JSON not regenerated # after cargo vdev deprecation generate git add deprecations.json git commit -m "add fragment"
Defensive patterns
Strategy: validation
Validate before calling
let expected = deprecation::rendered_json(&repo_root)?;
let on_disk = std::fs::read_to_string(&json_path)?;
if on_disk != expected { println!("deprecations.json stale; run cargo vdev deprecation generate"); } Type guard
fn json_is_fresh(repo_root: &Path) -> bool { std::fs::read_to_string(repo_root.join("deprecations.json")).map(|d| d == deprecation::rendered_json(repo_root).unwrap_or_default()).unwrap_or(false) } Try / catch
match result { Err(e) if e.to_string().contains("is out of date") => { eprintln!("Run: cargo vdev deprecation generate, then commit"); } Err(e) => return Err(e), Ok(v) => v } Prevention
- Always run `cargo vdev deprecation generate` after touching fragment .md files
- Never hand-edit the generated JSON
- Include the check in a pre-push hook (make check-changelog-fragments style)
When it happens
Trigger: Running `cargo vdev deprecation check` after adding/editing/removing a fragment .md file (or changing render logic) without regenerating DEPRECATIONS_JSON, so std::fs::read_to_string(json_path) != rendered_json(&repo_root).
Common situations: Typical in CI after a contributor hand-edits the JSON or forgets to run the generate step before committing; also occurs after merging branches where fragments changed on both sides.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- Neither nor found; the deprecation fragment system is not…
- Conflicting enacted entry for
- Deprecation fragment
- Deprecation fragment
- Deprecation fragment
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/2b161f5a6507e8a0.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/deprecation/check.rs:83
Update deprecated_since to {} or earlier.",
future.len(),
next_minor.major,
next_minor.minor,
next_minor
);
}
}
Err(e) => {
eprintln!(
"Warning: skipping future-version validation; could not determine latest release version: {e}"
);
}
}
let on_disk = std::fs::read_to_string(&json_path).unwrap_or_default();
let expected = deprecation::rendered_json(&repo_root)?;
if on_disk != expected {
bail!(
"{} is out of date. Run `cargo vdev deprecation generate` and commit the result.",
json_path.display()
);
}
let enacted_count = deprecation::validate_enacted(&repo_root)?;
println!(
"{} is up to date ({enacted_count} enacted entries valid).",
json_path.display()
);
Ok(())
}
}
View on GitHub (pinned to bdb87aeaa4)