{"record":{"id":"169c04bd71bb6239","repo":"BoundaryML/baml","slug":"active-toolchain-is-a-local-path-and-has-no-version","errorCode":null,"errorMessage":"active toolchain is a local path and has no version: {}","messagePattern":"active toolchain is a local path and has no version: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml/src/main.rs","lineNumber":600,"sourceCode":"            return Some(candidate);\n        }\n        if home.as_ref().is_some_and(|home| dir == *home) || !dir.pop() {\n            break;\n        }\n    }\n    None\n}\n\nfn concrete_version_for_selector(selector: &ResolvedSelector) -> Result<String> {\n    concrete_version_for_selector_with_base(selector, &baml_release::manifest_base_url())\n}\n\nfn concrete_version_for_selector_with_base(\n    selector: &ResolvedSelector,\n    current_base: &str,\n) -> Result<String> {\n    if is_path_selector(&selector.selector) {\n        return Err(anyhow!(\n            \"active toolchain is a local path and has no version: {}\",\n            selector.selector\n        ));\n    }\n    if is_channel(&selector.selector) {\n        let state = read_state();\n        if let Some(channel) = state.channels.get(&selector.selector) {\n            if channel\n                .manifest_base_url\n                .as_deref()\n                .is_some_and(|base| base.trim_end_matches('/') != current_base)\n            {\n                return Err(anyhow!(\n                    \"channel {} was selected from a different manifest source.\\nRun: baml toolchain use {} under the current manifest source.\",\n                    selector.selector,\n                    selector.selector\n                ));\n            }","sourceCodeStart":582,"sourceCodeEnd":618,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml/src/main.rs#L582-L618","documentation":"Fires when the code needs a concrete version string for the active selector (e.g. `baml --version`, status, or pinning state) but the selector is a local path. Path-based toolchains are unpacked directories built locally, not versioned downloads, so there is no version number to report. This is a sentinel error from the version-resolution guard, not a corrupted install.","triggerScenarios":"Thrown at baml_language/crates/baml/src/main.rs:600 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["If a version number is required, switch to a versioned toolchain: `baml toolchain use canary` (or nightly / a specific version)","If reporting status of a local build is intended, use `baml toolchain status` which handles path selectors without needing a version","To pin a version for the project, write it in baml.toml [toolchain] instead of using a path selector"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}