{"record":{"id":"2144df73c762adeb","repo":"zed-industries/zed","slug":"no-split-specifications-provided","errorCode":null,"errorMessage":"no split specifications provided","messagePattern":"no split specifications provided","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/edit_prediction_cli/src/split_dataset.rs","lineNumber":247,"sourceCode":"\n    let (input_path, split_specs_raw): (Option<&Path>, &[PathBuf]) =\n        if inputs.first().is_some_and(|p| {\n            let s = p.to_string_lossy();\n            !s.contains('=')\n        }) {\n            let first = inputs.first().map(|p| p.as_path());\n            let first = if first == Some(Path::new(\"-\")) {\n                None\n            } else {\n                first\n            };\n            (first, &inputs[1..])\n        } else {\n            (None, inputs)\n        };\n\n    if split_specs_raw.is_empty() {\n        bail!(\"no split specifications provided\");\n    }\n\n    let specs: Vec<SplitSpec> = split_specs_raw\n        .iter()\n        .map(|p| parse_split_spec(&p.to_string_lossy()))\n        .collect::<Result<Vec<_>>>()?;\n\n    let lines = read_lines_from_input(input_path)?;\n    let total_lines = lines.len();\n\n    if total_lines == 0 {\n        for spec in &specs {\n            write_lines_to_file(&spec.path, &[])?;\n        }\n        return Ok(());\n    }\n\n    let mut grouped_lines = group_lines(&lines, args.stratify);","sourceCodeStart":229,"sourceCodeEnd":265,"githubUrl":"https://github.com/zed-industries/zed/blob/f4178619acd0d47ea1f76a2025c42962c6d6638c/crates/edit_prediction_cli/src/split_dataset.rs#L229-L265","documentation":"Bailed by run_split when zero `<path>=<size>` split specifications remain after argument processing. The first argument without an `=` is treated as the optional input path; every remaining argument must be a spec. Passing only `input.jsonl` (or any argument set with no `=`-containing specs) leaves the spec list empty and triggers this bail.","triggerScenarios":"Running `ep split input.jsonl` with no specs, or passing specs whose `=` was lost to quoting/expansion so everything got classified as the input path.","commonSituations":"Forgetting the specs half of the command; shell quoting that strips or splits on `=`; feeding a bare filename where a `path=size` pair was expected.","solutions":["Append at least one spec containing `=`, e.g. `ep split input.jsonl train.jsonl=80% valid.jsonl=rest`","Verify each spec has the `<path>=<size>` shape where size is a count, a percentage, or `rest`","Quote each spec as one shell word so `=` survives expansion"],"exampleFix":"# before\nep split input.jsonl\n\n# after\nep split input.jsonl train.jsonl=80% valid.jsonl=rest","handlingStrategy":"validation","validationCode":"let spec_count = args.iter().filter(|a| a.contains('=')).count();\nif spec_count == 0 {\n    // reject before running: at least one <path>=<size> spec is required\n}","typeGuard":null,"tryCatchPattern":"Validate that at least one argument contains '=' before invoking; if none does, the caller is passing only an input path and must add specs.","preventionTips":["Treat `<path>=<size>` as a required shape in scripts that build split commands","Quote each spec as a single shell word so '=' survives expansion","Unit-test command builders that generate split invocations"],"tags":["cli","usage","missing-arguments","rust"],"backgroundTag":"missing-cli-argument","analyzedSha":"f4178619acd0d47ea1f76a2025c42962c6d6638c","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}