{"record":{"id":"2b161f5a6507e8a0","repo":"vectordotdev/vector","slug":"is-out-of-date-run-cargo-vdev-deprecation-generate-and","errorCode":null,"errorMessage":"{} is out of date. Run `cargo vdev deprecation generate` and commit the result.","messagePattern":"(.+?) is out of date\\. Run `cargo vdev deprecation generate` and commit the result\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/deprecation/check.rs","lineNumber":83,"sourceCode":"                         Update deprecated_since to {} or earlier.\",\n                        future.len(),\n                        next_minor.major,\n                        next_minor.minor,\n                        next_minor\n                    );\n                }\n            }\n            Err(e) => {\n                eprintln!(\n                    \"Warning: skipping future-version validation; could not determine latest release version: {e}\"\n                );\n            }\n        }\n\n        let on_disk = std::fs::read_to_string(&json_path).unwrap_or_default();\n        let expected = deprecation::rendered_json(&repo_root)?;\n        if on_disk != expected {\n            bail!(\n                \"{} is out of date. Run `cargo vdev deprecation generate` and commit the result.\",\n                json_path.display()\n            );\n        }\n\n        let enacted_count = deprecation::validate_enacted(&repo_root)?;\n        println!(\n            \"{} is up to date ({enacted_count} enacted entries valid).\",\n            json_path.display()\n        );\n\n        Ok(())\n    }\n}\n","sourceCodeStart":65,"sourceCodeEnd":98,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/deprecation/check.rs#L65-L98","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before\ngit commit -m \"add fragment\"  # JSON not regenerated\n# after\ncargo vdev deprecation generate\ngit add deprecations.json\ngit commit -m \"add fragment\"","handlingStrategy":"validation","validationCode":"let expected = deprecation::rendered_json(&repo_root)?;\nlet on_disk = std::fs::read_to_string(&json_path)?;\nif on_disk != expected { println!(\"deprecations.json stale; run cargo vdev deprecation generate\"); }","typeGuard":"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) }","tryCatchPattern":"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 }","preventionTips":["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)"],"tags":["deprecation","codegen","stale-artifact"],"backgroundTag":"checksum-mismatch","analyzedSha":"bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013","analyzedAt":"2026-09-16T02:53:35.741Z","contentChangedAt":"2026-09-16T02:53:35.741Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}