{"record":{"id":"9412306b7ed076d2","repo":"jdx/mise","slug":"formula-has-no-stable-source-url","errorCode":null,"errorMessage":"{}: formula has no stable source URL","messagePattern":"(.+?): formula has no stable source URL","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/source.rs","lineNumber":65,"sourceCode":"}\n\n/// why `has_bottle` is false, for log/dry-run output\npub(super) fn missing_bottle_reason(formula: &Formula) -> String {\n    match formula.bottle_files() {\n        Some(files) if !files.is_empty() => {\n            let mut tags: Vec<String> = files.keys().cloned().collect();\n            tags.sort();\n            format!(\"bottles exist only for: {}\", tags.join(\", \"))\n        }\n        _ => \"source-only formula, no bottles\".to_string(),\n    }\n}\n\n/// Reject early what the source builder cannot handle, with the reason —\n/// checked before any work happens so dry-run and real runs fail alike.\npub(super) fn check_buildable(formula: &Formula) -> Result<()> {\n    let Some(src) = formula.stable_url() else {\n        bail!(\"{}: formula has no stable source URL\", formula.name);\n    };\n    if let Some(using) = &src.using {\n        bail!(\n            \"{}: source uses the {using:?} download strategy, which mise cannot build from \\\n             (and no bottle exists for this machine)\",\n            formula.name,\n        );\n    }\n    if src.checksum.is_none() {\n        bail!(\"{}: source archive has no sha256 in the API\", formula.name);\n    }\n    // the formula .rb must be pinned to the API snapshot's commit and\n    // verifiable — evaluating a newer/unverified formula against older\n    // source metadata would build the wrong thing\n    if formula.ruby_source_path.is_none() {\n        bail!(\"{}: API metadata has no ruby_source_path\", formula.name);\n    }\n    if formula.tap_git_head.is_none() {","sourceCodeStart":47,"sourceCodeEnd":83,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/system/packages/brew/source.rs#L47-L83","documentation":"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.","triggerScenarios":"`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.","commonSituations":"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.","solutions":["Use a platform that has a prebuilt bottle for the formula, or pick a different formula version that ships bottles","Install the formula directly with brew if it supports head-only builds; mise's source builder cannot","Choose an alternative tool spelling in mise (e.g. a different backend like github/aqua) that provides binaries","Check the Homebrew API entry (`https://formulae.brew.sh/api/formula/<name>.json`) to confirm the formula actually has a stable url"],"exampleFix":"# before\nmise use brew:headonly-formula\n# after\nmise use github:owner/headonly-formula","handlingStrategy":"validation","validationCode":"curl -s https://formulae.brew.sh/api/formula/<name>.json | jq -e '.urls.stable.url' >/dev/null && echo buildable || echo 'no stable url'","typeGuard":null,"tryCatchPattern":"catch message 'formula has no stable source URL' => switch to a bottle-backed platform or a non-brew backend for that tool","preventionTips":["Check formulae.brew.sh for bottles on your platform before using brew: backend","Avoid head-only formulas via brew backend","Use github:/aqua: backends for tools without bottles on your OS","Prefer LTS versions with bottle coverage"],"tags":["homebrew","build-from-source","unsupported"],"backgroundTag":"unsupported-operation","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}