vectordotdev/vector · error

The specified version

Error message

The specified version '{new}' must be a single patch, minor, or major bump from {last}

What it means

`validate_single_bump` enforces that the requested release version is exactly one patch, minor, or major increment above the last tagged version. If `bump_type(last, new)` returns none (e.g. skipping a version, downgrading, or a pre-release mismatch), the command fails with this message.

Solutions

  1. Run the command with the next single version bump (e.g. last=0.45.0 → use 0.45.1, 0.46.0, or 1.0.0).
  2. If multiple versions must be cut, generate each release one bump at a time.
  3. Check the actual latest tag with `git tag --sort=-v:refname | head` and align your version argument to it.

Example fix

// before
vdev release generate-cue 0.47.0   # last tag is 0.45.0 → two bumps
// after
vdev release generate-cue 0.46.0
vdev release generate-cue 0.47.0
Defensive patterns

Strategy: validation

Validate before calling

LAST=$(git tag --sort=-v:refname | head -1); echo "next versions: patch/minor/major bump of $LAST"

Prevention

When it happens

Trigger: Running `vdev release generate-cue <version>` where `<version>` is more than one bump above the latest tag (e.g. last=0.45.0, new=0.47.0), is lower than the last tag, or is otherwise not a single patch/minor/major step.

Common situations: Typo in the version argument; skipping a release that was decided to be cut; releasing from a branch that has missed intermediate versions; forgetting the actual latest tag on a fork or shallow clone.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


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

Appendix: source

Thrown at vdev/src/commands/release/generate_cue.rs:266

                .parse::<u32>()
                .ok()
        })
        .max()
        .unwrap_or(0);

    let content = format!(
        "---\ntitle: Vector v{version} release notes\nweight: {}\n---\n",
        max_weight + 1
    );
    atomic_write(&stub_path, &content)?;
    Ok(())
}

// ---------- Tag / version discovery ----------

fn validate_single_bump(last: &Version, new: &Version) -> Result<()> {
    if bump_type(last, new).is_none() {
        bail!(
            "The specified version '{new}' must be a single patch, minor, or major bump from {last}"
        );
    }
    Ok(())
}

/// Returns Some("patch"|"minor"|"major") if `new` is exactly one bump above `last`, else None.
fn bump_type(last: &Version, new: &Version) -> Option<&'static str> {
    if new <= last {
        return None;
    }
    let patch = Version::new(last.major, last.minor, last.patch + 1);
    let minor = Version::new(last.major, last.minor + 1, 0);
    let major = if last.major == 0 {
        Version::new(0, last.minor + 1, 0)
    } else {
        Version::new(last.major + 1, 0, 0)
    };

View on GitHub (pinned to 0d4ab78a4f)