{"record":{"id":"6abce1feda6692f5","repo":"vectordotdev/vector","slug":"neither-nor-found-the-deprecation-fragment-system-is-not","errorCode":null,"errorMessage":"Neither {} nor {} found; the deprecation fragment system is not installed in this repo.","messagePattern":"Neither (.+?) nor (.+?) found; the deprecation fragment system is not installed in this repo\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"vdev/src/commands/deprecation/check.rs","lineNumber":29,"sourceCode":"#[command()]\npub struct Cli {}\n\nimpl Cli {\n    pub fn exec(self) -> Result<()> {\n        let repo_root = paths::find_repo_root()?;\n        let dir = repo_root.join(deprecation::DEPRECATION_DIR);\n\n        let json_path = repo_root.join(deprecation::DEPRECATIONS_JSON);\n        let entries = if dir.is_dir() {\n            deprecation::read_deprecation_fragments(&dir)?\n        } else if json_path.is_file() {\n            println!(\n                \"{} not found; validating generated JSON only.\",\n                dir.display()\n            );\n            Vec::new()\n        } else {\n            bail!(\n                \"Neither {} nor {} found; the deprecation fragment system is not installed in this repo.\",\n                dir.display(),\n                json_path.display()\n            );\n        };\n\n        if entries.is_empty() {\n            println!(\"No deprecation fragments found.\");\n        } else {\n            for entry in &entries {\n                println!(\"  ok  {}\", entry.filename);\n            }\n            println!(\"{} deprecation fragment(s) are valid.\", entries.len());\n        }\n\n        // Reject any fragment with a deprecated_since newer than the next\n        // minor release. Skipped (with a warning) when the checkout has no\n        // release tags so shallow CI/source checkouts can still validate","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/vectordotdev/vector/blob/bdb87aeaa4c4ff27c0ba643c1c77b21bf2ef4013/vdev/src/commands/deprecation/check.rs#L11-L47","documentation":"Thrown by `cargo vdev deprecation check` (exec) when neither the deprecation fragments directory nor the generated deprecations JSON file exists in the repository, meaning the deprecation fragment system has not been installed/set up in this repo. The check cannot proceed without at least one of these inputs.","triggerScenarios":"Running `cargo vdev deprecation check` in a repo checkout where the DEPRECATION_DIR directory is missing AND the DEPRECATIONS_JSON file is missing (both is_dir() and is_file() checks fail).","commonSituations":"Occurs in shallow/partial checkouts, older branches before the deprecation system was introduced, or forks that stripped the deprecation directory.","solutions":["Switch to a branch/checkout that contains the deprecation fragment system.","Run `cargo vdev deprecation generate` after restoring the fragments directory to create the JSON.","Verify the repo root was detected correctly (paths::find_repo_root) — run from the repo root.","If this repo intentionally has no deprecations, skip the check instead of running it."],"exampleFix":"// before (fresh clone missing files)\ncargo vdev deprecation check\n// after\ngit checkout main\ncargo vdev deprecation generate && cargo vdev deprecation check","handlingStrategy":"fallback","validationCode":"use std::path::Path;\nlet dir = repo_root.join(\"deprecations\");\nlet json = repo_root.join(\"deprecations.json\");\nif !dir.is_dir() && !json.is_file() { eprintln!(\"deprecation system not installed; skipping check\"); return; }","typeGuard":"fn deprecation_system_installed(repo_root: &Path) -> bool { repo_root.join(\"deprecations\").is_dir() || repo_root.join(\"deprecations.json\").is_file() }","tryCatchPattern":"match result { Err(e) if e.to_string().contains(\"deprecation fragment system is not installed\") => { /* treat as skip/no-op in CI */ } Err(e) => return Err(e), Ok(v) => v }","preventionTips":["Check the repo contains the deprecation directory before wiring the check into CI","Run commands from the repository root","Keep branches synced with upstream so the deprecation system files exist"],"tags":["cli","deprecation","repo-setup"],"backgroundTag":"file-not-found","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"}