{"record":{"id":"f4a62e60d0b67217","repo":"BoundaryML/baml","slug":"active-baml-toolchain-does-not-include-assets-baml-vscode","errorCode":null,"errorMessage":"active BAML toolchain does not include assets/baml-vscode.vsix at {}","messagePattern":"active BAML toolchain does not include assets/baml-vscode\\.vsix at (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_cli/src/ide_command.rs","lineNumber":219,"sourceCode":"}\n\nfn active_toolchain_vsix() -> Result<PathBuf> {\n    let exe = env::current_exe().context(\"failed to locate baml-cli executable\")?;\n    let toolchain_root = exe\n        .parent()\n        .and_then(Path::parent)\n        .ok_or_else(|| anyhow!(\"failed to determine active BAML toolchain root\"))?;\n    let vsix = toolchain_root.join(\"assets\").join(\"baml-vscode.vsix\");\n    if !vsix.exists() {\n        // A local build has no assets/ next to it, so say that plainly rather\n        // than reporting a missing file the developer never expected to exist.\n        if let Some(local) = env::var_os(\"BAML_WRAPPER_LOCAL_TOOLCHAIN\") {\n            anyhow::bail!(\n                \"baml ide install needs a managed BAML toolchain, but the active one is a local binary at {}.\\nThe VS Code extension ships with released toolchains only.\\nRun: baml toolchain use canary\",\n                Path::new(&local).display()\n            );\n        }\n        anyhow::bail!(\n            \"active BAML toolchain does not include assets/baml-vscode.vsix at {}\",\n            vsix.display()\n        );\n    }\n    Ok(vsix)\n}\n\nfn command_on_path(command: &str) -> Option<OsString> {\n    let path = env::var_os(\"PATH\")?;\n    for dir in env::split_paths(&path) {\n        #[cfg(windows)]\n        {\n            let candidate = dir.join(format!(\"{command}.cmd\"));\n            if candidate.exists() {\n                return Some(OsString::from(format!(\"{command}.cmd\")));\n            }\n        }\n        let candidate = dir.join(command);","sourceCodeStart":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_cli/src/ide_command.rs#L201-L237","documentation":"`baml ide install` needs the VS Code extension package (assets/baml-vscode.vsix) that ships inside a managed BAML toolchain. This bail fires from active_toolchain_vsix when the active toolchain is either a user-provided local binary (via BAML_WRAPPER_LOCAL_TOOLCHAIN) or a managed toolchain that has no vsix asset bundled at the expected path. Released toolchains include the extension; local/custom ones do not.","triggerScenarios":"Run `baml ide install` while BAML_WRAPPER_LOCAL_TOOLCHAIN points at a locally built baml binary, or while the active managed toolchain (per `baml toolchain use`) lacks assets/baml-vscode.vsix.","commonSituations":"Developers building BAML from source and pointing BAML_WRAPPER_LOCAL_TOOLCHAIN at their build output, or CI/dev toolchains stripped of bundled assets, who then try to install the VS Code extension via the CLI.","solutions":["Switch to a released managed toolchain: run `baml toolchain use canary` (or a released version) and retry `baml ide install`.","Unset BAML_WRAPPER_LOCAL_TOOLCHAIN so the CLI resolves the managed toolchain that bundles the vsix.","Install the VS Code extension manually from the marketplace or a .vsix obtained from a BAML release instead of via `baml ide install`.","If you control the toolchain packaging, include assets/baml-vscode.vsix in the toolchain bundle."],"exampleFix":"// before\nBAML_WRAPPER_LOCAL_TOOLCHAIN=~/baml/target/debug/baml baml ide install\n// after\nbaml toolchain use canary && baml ide install","handlingStrategy":"validation","validationCode":"# guard before `baml ide install`\nif [ -n \"$BAML_WRAPPER_LOCAL_TOOLCHAIN\" ]; then echo \"local toolchain: use released toolchain first\"; exit 1; fi\nbaml toolchain use canary","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep BAML_WRAPPER_LOCAL_TOOLCHAIN unset for extension-install workflows","Only install the vsix from released managed toolchains","Check `baml toolchain list`/current toolchain before ide operations"],"tags":["cli","vscode","toolchain","asset-missing"],"backgroundTag":"file-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}