{"record":{"id":"cc8e18fc42b0d7e2","repo":"nikivdev/code","slug":"unsupported-external-cli-link-record-version-in","errorCode":null,"errorMessage":"unsupported external CLI link record version {} in {}","messagePattern":"unsupported external CLI link record version (.+?) in (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/external_cli.rs","lineNumber":524,"sourceCode":"        if !path.is_dir() {\n            continue;\n        }\n        let manifest = path.join(MANIFEST_NAME);\n        if manifest.is_file() {\n            manifests.push(manifest);\n        }\n    }\n\n    manifests\n}\n\nfn read_link_record(path: &Path) -> Result<ExternalCliLinkRecord> {\n    let content =\n        fs::read_to_string(path).with_context(|| format!(\"failed to read {}\", path.display()))?;\n    let record: ExternalCliLinkRecord =\n        toml::from_str(&content).with_context(|| format!(\"failed to parse {}\", path.display()))?;\n    if record.version != LINK_RECORD_VERSION {\n        bail!(\n            \"unsupported external CLI link record version {} in {}\",\n            record.version,\n            path.display()\n        );\n    }\n    Ok(record)\n}\n\nfn read_manifest(path: &Path) -> Result<ExternalCliManifest> {\n    let content =\n        fs::read_to_string(path).with_context(|| format!(\"failed to read {}\", path.display()))?;\n    let manifest: ExternalCliManifest =\n        toml::from_str(&content).with_context(|| format!(\"failed to parse {}\", path.display()))?;\n    if manifest.version != 1 {\n        bail!(\n            \"unsupported external CLI manifest version {} in {}\",\n            manifest.version,\n            path.display()","sourceCodeStart":506,"sourceCodeEnd":542,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/external_cli.rs#L506-L542","documentation":"`read_link_record` parses a link record TOML file and validates its `version` field against the library's supported `LINK_RECORD_VERSION`. A record written by a different (older or newer) version of the tooling is rejected, with the found version and file path in the message.","triggerScenarios":"Calling `install_external_cli_link`, `resolve_installed_external_cli_tool`, or `load_link_records` on a link record file whose parsed `version` differs from `LINK_RECORD_VERSION`.","commonSituations":"Link records created by an older release of the toolchain after an upgrade; records hand-written or copied from a different project using a different record format; a partially migrated workspace mixing record versions.","solutions":["Re-create the links with the current version of the tooling so records are written with `LINK_RECORD_VERSION`.","Hand-edit the record's `version` field to the supported value only if the rest of the schema matches the current format.","Upgrade (or pin) the toolchain so the record version and the library agree.","Delete stale records and re-link affected tools."],"exampleFix":"# before (link record)\nversion = 1\n\n# after (supported LINK_RECORD_VERSION)\nversion = 2","handlingStrategy":"validation","validationCode":"fn check_record_version(path: &Path, supported: i64) -> Result<(), String> {\n    let text = std::fs::read_to_string(path).map_err(|e| e.to_string())?;\n    let v: toml::Value = toml::from_str(&text).map_err(|e| e.to_string())?;\n    let ver = v.get(\"version\").and_then(|v| v.as_integer()).unwrap_or(-1);\n    if ver == supported { Ok(()) } else { Err(format!(\"{}: version {ver} != {supported}\", path.display())) }\n}","typeGuard":null,"tryCatchPattern":"match loader.load_link_records(&dir) {\n    Err(e) if e.to_string().contains(\"unsupported external CLI link record version\") => {\n        eprintln!(\"{e}; regenerating links with current tooling\");\n        regen_all_links()?;\n        loader.load_link_records(&dir)\n    }\n    other => other,\n}","preventionTips":["Regenerate link records after upgrading the toolchain.","Don't hand-write or copy link records between projects.","Pin the toolchain version across the team/CI so record versions match.","Check the `version` field before consuming records in scripts."],"tags":["external-cli","versioning","link-record"],"backgroundTag":"unsupported-format-version","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}