zed-industries/zed · error

missing split point after kind '{kind}:'

Error message

missing split point after kind '{kind}:'

What it means

parse_split_point parses strings like 'kind:value'; after a recognized kind prefix, the remainder did not end at a valid split point boundary — the message names the kind whose value is malformed. The split-point specification on the CLI/config is the input at fault.

Source

Thrown at crates/edit_prediction_cli/src/split_commit.rs:194

fn parse_split_point_value(value: &str) -> Result<SplitPointValue> {
    if value.contains('.') {
        value
            .parse::<f64>()
            .map(SplitPointValue::Fraction)
            .with_context(|| format!("invalid split point fraction '{value}'"))
    } else {
        value
            .parse::<usize>()
            .map(SplitPointValue::Index)
            .with_context(|| format!("invalid split point index '{value}'"))
    }
}

fn parse_split_point(value: &str) -> Result<SplitPoint> {
    if let Some((kind, split_point)) = value.split_once(':') {
        let kind = kind.parse::<SplitPointKind>()?;
        anyhow::ensure!(
            !split_point.is_empty(),
            "missing split point after kind '{kind}:'"
        );
        return Ok(SplitPoint::KindWithSplit {
            kind,
            split_point: parse_split_point_value(split_point)?,
        });
    }

    if let Ok(kind) = value.parse::<SplitPointKind>() {
        return Ok(SplitPoint::Kind(kind));
    }

    match parse_split_point_value(value)? {
        SplitPointValue::Fraction(value) => Ok(SplitPoint::Fraction(value)),
        SplitPointValue::Index(value) => Ok(SplitPoint::Index(value)),
    }
}

View on GitHub (pinned to f4178619ac)

Solutions

  1. Fix the split point syntax, e.g. 'index:3' or 'fraction:0.5' with valid numbers
  2. Check for trailing characters after the value
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/edit_prediction_cli/src/split_commit.rs:194 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/0ca123c765679d1b. Report an issue: GitHub.