BoundaryML/baml · error
BAML toolchain is corrupt: VERSION contains . Run: baml…
Error message
BAML toolchain {version} is corrupt: VERSION contains {}.
Run: baml toolchain install {version} --force What it means
Integrity check failure: the wrapper reads the VERSION file inside an installed toolchain's directory and compares it to the directory name. A mismatch means the installation is corrupt — the directory was renamed, partially overwritten, or the files were copied between version directories. The toolchain is not trusted to run in this state.
Solutions
- Reinstall over the corrupt copy: `baml toolchain install <version> --force`
- If it recurs, delete the toolchain directory manually and reinstall to rule out a partially-copied download
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at baml_language/crates/baml/src/main.rs:683 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/ebdb19f4b1f774d9.
Report an issue: GitHub.
Appendix: source
Thrown at baml_language/crates/baml/src/main.rs:683
}
fn toolchain_cli_path(version: &str) -> PathBuf {
toolchains_dir()
.join(version)
.join("bin")
.join(cli_exe_name())
}
fn verify_toolchain_version_file(version: &str) -> Result<()> {
let path = toolchains_dir().join(version).join("VERSION");
let actual = fs::read_to_string(&path).with_context(|| {
format!(
"failed to read toolchain VERSION file at {}",
path.display()
)
})?;
if actual.trim() != version {
anyhow::bail!(
"BAML toolchain {version} is corrupt: VERSION contains {}.\nRun: baml toolchain install {version} --force",
actual.trim()
);
}
Ok(())
}
fn is_channel(selector: &str) -> bool {
selector == "canary" || selector == "nightly"
}
/// Whether a selector names a local `baml-cli` binary rather than a channel or
/// a version. Channels and versions never contain a path separator, so a bare
/// path is unambiguous and needs no prefix or flag to mark it.
fn is_path_selector(selector: &str) -> bool {
is_path_selector_on(selector, cfg!(windows))
}
View on GitHub (pinned to bd85ce9dee)