jdx/mise · error

: formula has no stable source URL

Error message

{}: formula has no stable source URL

What it means

mise's source (build-from-source) builder for Homebrew formulas requires the formula's stable URL to download sources. When the API metadata has no stable source URL, mise rejects the build up front via `check_buildable` so both dry-run and real runs fail identically.

Solutions

  1. Use a platform that has a prebuilt bottle for the formula, or pick a different formula version that ships bottles
  2. Install the formula directly with brew if it supports head-only builds; mise's source builder cannot
  3. Choose an alternative tool spelling in mise (e.g. a different backend like github/aqua) that provides binaries
  4. Check the Homebrew API entry (`https://formulae.brew.sh/api/formula/<name>.json`) to confirm the formula actually has a stable url

Example fix

# before
mise use brew:headonly-formula
# after
mise use github:owner/headonly-formula
Defensive patterns

Strategy: validation

Validate before calling

curl -s https://formulae.brew.sh/api/formula/<name>.json | jq -e '.urls.stable.url' >/dev/null && echo buildable || echo 'no stable url'

Try / catch

catch message 'formula has no stable source URL' => switch to a bottle-backed platform or a non-brew backend for that tool

Prevention

When it happens

Trigger: `build` calls `check_buildable` on a formula with no bottle for the host platform; `formula.stable_url()` returns None — typically formulae with only head URLs, or metadata missing the stable spec.

Common situations: Installing on an unsupported platform/ARCH where no bottle exists and the formula lacks a stable source spec (e.g. head-only formulae like `git-tip`-style builds); API data anomalies.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/9412306b7ed076d2. Report an issue: GitHub.

Appendix: source

Thrown at src/system/packages/brew/source.rs:65

}

/// why `has_bottle` is false, for log/dry-run output
pub(super) fn missing_bottle_reason(formula: &Formula) -> String {
    match formula.bottle_files() {
        Some(files) if !files.is_empty() => {
            let mut tags: Vec<String> = files.keys().cloned().collect();
            tags.sort();
            format!("bottles exist only for: {}", tags.join(", "))
        }
        _ => "source-only formula, no bottles".to_string(),
    }
}

/// Reject early what the source builder cannot handle, with the reason —
/// checked before any work happens so dry-run and real runs fail alike.
pub(super) fn check_buildable(formula: &Formula) -> Result<()> {
    let Some(src) = formula.stable_url() else {
        bail!("{}: formula has no stable source URL", formula.name);
    };
    if let Some(using) = &src.using {
        bail!(
            "{}: source uses the {using:?} download strategy, which mise cannot build from \
             (and no bottle exists for this machine)",
            formula.name,
        );
    }
    if src.checksum.is_none() {
        bail!("{}: source archive has no sha256 in the API", formula.name);
    }
    // the formula .rb must be pinned to the API snapshot's commit and
    // verifiable — evaluating a newer/unverified formula against older
    // source metadata would build the wrong thing
    if formula.ruby_source_path.is_none() {
        bail!("{}: API metadata has no ruby_source_path", formula.name);
    }
    if formula.tap_git_head.is_none() {

View on GitHub (pinned to 533346cc37)