vectordotdev/vector · error

fragment(s) have a deprecated_since version newer than the…

Error message

{} fragment(s) have a deprecated_since version newer than the next release ({}.{}). Update deprecated_since to {} or earlier.

What it means

Thrown by `cargo vdev deprecation check` when one or more deprecation fragments declare a `deprecated_since` version that is newer than the computed next release minor version. The deprecation policy requires announcements to target the current or an earlier minor than the upcoming release.

Solutions

  1. Edit the listed fragment files and lower `deprecated_since` to the next release version or earlier.
  2. If the version is correct, wait for the next minor release cycle before enacting.
  3. Regenerate/verify the next-release computation (git::latest_release_version + minor+1) to confirm expectations.
  4. Re-run `cargo vdev deprecation check` after edits.

Example fix

# before (next release is 0.49)
deprecated_since = "0.50.0"
# after
deprecated_since = "0.49.0"
Defensive patterns

Strategy: validation

Validate before calling

let next = Version::new(latest.major, latest.minor + 1, 0);
let since: Version = fragment.deprecated_since.parse()?;
if since > next { eprintln!("{}: lower deprecated_since to {} or earlier", fragment.filename, next); }

Type guard

fn deprecated_since_is_current(since: &Version, next: &Version) -> bool { since <= next }

Try / catch

match result { Err(e) if e.to_string().contains("deprecated_since version newer than the next release") => { eprintln!("Edit the listed fragments' deprecated_since field"); } Err(e) => return Err(e), Ok(v) => v }

Prevention

When it happens

Trigger: Any fragment in the deprecation directory has deprecated_since > next_minor (next release major.minor), producing a non-empty `future` list which triggers the bail after listing each offending fragment.

Common situations: Happens when an author writes deprecated_since = "0.50.0" while the next release is 0.49, or when a release slips and previously-valid fragments are now ahead of the next minor.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


AI-assisted analysis of vectordotdev/vector@bdb87aeaa4 (2026-09-16). Data as JSON: /api/errors/44fe888ab89439e3. Report an issue: GitHub.

Appendix: source

Thrown at vdev/src/commands/deprecation/check.rs:63

        // 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 validate
        // fragment frontmatter + generated JSON.
        match git::latest_release_version() {
            Ok(latest) => {
                let next_minor = Version::new(latest.major, latest.minor + 1, 0);
                let future: Vec<_> = entries
                    .iter()
                    .filter(|e| e.deprecated_since.0 > next_minor)
                    .collect();
                if !future.is_empty() {
                    for e in &future {
                        eprintln!(
                            "  future  {} (deprecated_since: {}, next release: {}.{})",
                            e.filename, e.deprecated_since, next_minor.major, next_minor.minor
                        );
                    }
                    bail!(
                        "{} fragment(s) have a deprecated_since version newer than the next release ({}.{}). \
                         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)?;

View on GitHub (pinned to bdb87aeaa4)