{"record":{"id":"69b87bcfedc90290","repo":"jdx/mise","slug":"brew-bottles-are-only-published-for-a-formula-s-cu","errorCode":null,"errorMessage":"brew bottles are only published for a formula's current version ('{p}'): pin via the formula name instead (e.g. \"brew:postgresql@17\")","messagePattern":"brew bottles are only published for a formula's current version \\('(.+?)'\\): pin via the formula name instead \\(e\\.g\\. \"brew:postgresql@17\"\\)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/system/packages/brew/mod.rs","lineNumber":88,"sourceCode":"        for request in pkgs {\n            let name = request_formula_name(&request.name);\n            let state = linked_package_state(&request.version, pour::linked_state(name));\n            if matches!(state, PackageState::NeedsRepair { .. })\n                && pour::repair_link_record(name, opts.dry_run)?\n            {\n                repaired.push(request.clone());\n            }\n        }\n        Ok(repaired)\n    }\n\n    /// Prefetch bottles concurrently, then install the closure in dependency order.\n    async fn install_via_pour(&self, pkgs: &[PackageRequest], opts: &InstallOpts) -> Result<()> {\n        // bottles only exist for a formula's current version — versioning is\n        // expressed in the formula name itself (postgresql@17); the CLI\n        // filters pinned requests out before calling\n        if let Some(p) = pkgs.iter().find(|p| p.version.is_some()) {\n            bail!(\n                \"brew bottles are only published for a formula's current version ('{p}'): \\\n                 pin via the formula name instead (e.g. \\\"brew:postgresql@17\\\")\"\n            );\n        }\n        let roots: Vec<String> = pkgs.iter().map(|p| p.name.clone()).collect();\n        let closure = resolve::resolve_closure_with_taps(pkgs, !opts.dry_run).await?;\n        for rf in &closure {\n            if rf.on_request\n                && !roots.contains(&rf.formula.name)\n                && let Some(alias) = roots.iter().find(|r| rf.formula.aliases.contains(r))\n            {\n                warn!(\n                    \"'{alias}' is an alias of '{}' — use the canonical name in [bootstrap.packages] \\\n                     so `mise bootstrap packages status` can track it\",\n                    rf.formula.name\n                );\n            }\n        }","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/jdx/mise/blob/afd2eddd3a50c16190efc1c7e94404b48f72af57/src/system/packages/brew/mod.rs#L70-L106","documentation":"mise's brew bootstrap installs Homebrew bottles via pour, and bottles are only built by Homebrew for a formula's current version. Any PackageRequest with an explicit version cannot be satisfied by a bottle, so install_via_pour rejects the batch up front and tells you to encode the version in the formula name (e.g. \"brew:postgresql@17\").","triggerScenarios":"Calling `mise bootstrap packages apply` (or install/upgrade) with a brew package request carrying a version pin, e.g. `brew:postgresql@17.4` or a mise.toml entry like `brew = { version = '9.6' }`. The CLI filters pinned requests, but any that slip through hit this bail.","commonSituations":"Copy-pasting version pins from other backends into brew: tool config; trying to pin an older formula version the way you would with cargo/npm; upgrading a config that previously used the version-pinned syntax.","solutions":["Remove the version field and use the versioned formula name instead, e.g. brew:postgresql@17","Check the formula exists with that name: `brew info postgresql@17`","If you truly need an arbitrary old version, use a different backend or a brew tap/versioned formula"],"exampleFix":"# before\n[tools]\npostgresql = { backend = 'brew', version = '17.4' }\n# after\n[tools]\n'brew:postgresql@17' = 'latest'","handlingStrategy":"validation","validationCode":"const reqs = pkgs.filter(p => p.backend === 'brew' && p.version);\nif (reqs.length) throw new Error(`brew does not support version pins: ${reqs.map(p=>p.name).join(', ')} — use formula name like brew:postgresql@17`);","typeGuard":"const isPinned = (p) => typeof p.version === 'string' && p.version.length > 0;","tryCatchPattern":null,"preventionTips":["Express brew versions via versioned formula names (postgresql@17), never a version field","Audit mise.toml for brew entries carrying version keys","Keep brew package pins in comments documenting which versioned formula to use"],"tags":["brew","versioning","package-install"],"backgroundTag":"unsupported-operation","analyzedSha":"afd2eddd3a50c16190efc1c7e94404b48f72af57","analyzedAt":"2026-09-09T01:38:25.179Z","contentChangedAt":"2026-09-09T01:38:25.179Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}