BoundaryML/baml · error

self-update is disabled in this build. Update BAML with your

Error message

self-update is disabled in this build.
Update BAML with your package manager.

What it means

In builds compiled without the self-update feature (or with the no-self-update feature enabled, e.g. distro package-manager builds), self_update unconditionally returns this error. The wrapper cannot update itself in such builds and tells the user to rely on their package manager instead.

Source

Thrown at baml_language/crates/baml/src/main.rs:1526

fn uninstall_toolchain(version: &str) -> Result<()> {
    if is_path_selector(version) {
        return Err(anyhow!(
            "{version} is a local path and is not managed by the wrapper, so there is nothing to uninstall.\nTo stop using it, select a managed toolchain instead.\nRun: baml toolchain use canary\nOr:  baml toolchain use nightly"
        ));
    }
    let dir = toolchains_dir().join(version);
    if !dir.exists() {
        return Err(anyhow!("BAML toolchain {version} is not installed"));
    }
    fs::remove_dir_all(dir)?;
    println!("uninstalled BAML toolchain {version}");
    Ok(())
}

#[cfg(any(not(feature = "self-update"), feature = "no-self-update"))]
fn self_update() -> Result<()> {
    Err(anyhow!(
        "self-update is disabled in this build.\nUpdate BAML with your package manager."
    ))
}

#[cfg(all(feature = "self-update", not(feature = "no-self-update")))]
fn self_update() -> Result<()> {
    let current = env::current_exe()?;
    let manifest = fetch_wrapper_manifest()?;
    let target = baml_release::release_host_target_triple()?;
    let artifact = manifest.artifact_for_target(target)?.clone();
    let binary = if cfg!(windows) { "baml.exe" } else { "baml" };
    let fetcher = baml_release::Fetcher::from_artifact(
        ReleaseSpec {
            version: manifest.version.clone(),
            target: target.to_string(),
        },
        Product::Wrapper,
        artifact,

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Update via your package manager instead: e.g. `brew upgrade baml`, `apt upgrade`, or `cargo install`.
  2. Install the official standalone baml binary (built with the self-update feature) if you want `baml self-update` to work.

Example fix

// before
baml self-update   # disabled build
// after
brew upgrade baml   # or: apt upgrade baml / cargo install --force baml-cli
Defensive patterns

Strategy: fallback

Validate before calling

// detect a no-self-update build before attempting
const out = execFileSync('baml', ['self-update']).toString(); // error text says disabled
// or check install source: brew/apt/cargo installs are typically built without self-update

Try / catch

try {
  execFileSync('baml', ['self-update']);
} catch (e) {
  if (/self-update is disabled/.test(e.stderr?.toString() ?? '')) {
    execFileSync('brew', ['upgrade', 'baml']); // package-manager fallback
  }
}

Prevention

When it happens

Trigger: Running `baml self-update` (or any command routed to self_update) on a binary compiled with `not(feature = "self-update")` or `feature = "no-self-update"` — e.g. a distro/Homebrew/package-manager build.

Common situations: Using baml installed via apt/brew/cargo from a package registry where self-update is deliberately compiled out; container images with no-self-update builds; CI images expecting the standalone binary behavior.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/e35dc5156101e067. Report an issue: GitHub.