vectordotdev/vector · error
Neither nor found; the deprecation fragment system is not…
Error message
Neither {} nor {} found; the deprecation fragment system is not installed in this repo. What it means
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.
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.
Example fix
// before (fresh clone missing files) cargo vdev deprecation check // after git checkout main cargo vdev deprecation generate && cargo vdev deprecation check
Defensive patterns
Strategy: fallback
Validate before calling
use std::path::Path;
let dir = repo_root.join("deprecations");
let json = repo_root.join("deprecations.json");
if !dir.is_dir() && !json.is_file() { eprintln!("deprecation system not installed; skipping check"); return; } Type guard
fn deprecation_system_installed(repo_root: &Path) -> bool { repo_root.join("deprecations").is_dir() || repo_root.join("deprecations.json").is_file() } Try / catch
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 } Prevention
- 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
When it happens
Trigger: 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).
Common situations: Occurs in shallow/partial checkouts, older branches before the deprecation system was introduced, or forks that stripped the deprecation directory.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- expected a deprecation slug (e.g…
- Neither nor found; the deprecation fragment system is not…
- No deprecation fragment found at
- --version has prerelease or build metadata; only plain…
- already exists
AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16).
Data as JSON: /api/errors/6abce1feda6692f5.
Report an issue: GitHub.
Appendix: source
Thrown at vdev/src/commands/deprecation/check.rs:29
#[command()]
pub struct Cli {}
impl Cli {
pub fn exec(self) -> Result<()> {
let repo_root = paths::find_repo_root()?;
let dir = repo_root.join(deprecation::DEPRECATION_DIR);
let json_path = repo_root.join(deprecation::DEPRECATIONS_JSON);
let entries = if dir.is_dir() {
deprecation::read_deprecation_fragments(&dir)?
} else if json_path.is_file() {
println!(
"{} not found; validating generated JSON only.",
dir.display()
);
Vec::new()
} else {
bail!(
"Neither {} nor {} found; the deprecation fragment system is not installed in this repo.",
dir.display(),
json_path.display()
);
};
if entries.is_empty() {
println!("No deprecation fragments found.");
} else {
for entry in &entries {
println!(" ok {}", entry.filename);
}
println!("{} deprecation fragment(s) are valid.", entries.len());
}
// Reject any fragment with a deprecated_since newer than the next
// minor release. Skipped (with a warning) when the checkout has no
// release tags so shallow CI/source checkouts can still validateView on GitHub (pinned to bdb87aeaa4)