fix(brew-cask): drop stale brew advice from the cask metadata error - #12800
fix(brew-cask): drop stale brew advice from the cask metadata error#12800Marukome0743 wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe Homebrew cask fetch failure message now provides concise generic context. Fetching and validation behavior remain unchanged. ChangesHomebrew cask fetch errors
Estimated code review effort: 1 (Trivial) | ~2 minutes Merge Risk: ⚪ Minimal · up to Homebrew cask metadata failures now show concise, accurate context without stale installation or tap guidance. Runtime fetch and validation behavior remain unchanged, with no current merge-readiness risk identified. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryThis PR removes stale, caller-inappropriate Homebrew tap guidance and a broken documentation link from the shared cask metadata fetch error.
Confidence Score: 5/5The PR appears safe to merge because it only corrects stale error text and preserves existing behavior. No actionable defects or repository-rule violations remain in the reviewed change. Important Files Changed
Reviews (4): Last reviewed commit: "fix(brew-cask): drop stale brew advice f..." | Re-trigger Greptile |
|
This PR currently has failing checks. If this continues for 7 days, it will be closed automatically. This is warning day 1 of 7. Please update the PR when you have a chance. Feel free to reopen or create a new PR if it is closed and you'd like to continue working on it. This comment was generated by an automated workflow. |
31eca33 to
75e7e92
Compare
The message told the user mise would not proxy to the brew CLI and to install with `brew`. That stopped being true when tap support gained a Ruby fallback: fetch_cask now tries cask_from_ruby when the API metadata is missing, and reports separately that the definition could not be evaluated. The advice fired from inside that attempt, so it contradicted what mise was doing. It also linked brew.html#third-party-taps, which is not a section on that page. It was the only reference to that anchor in the repository. The formula path was already reorganized this way when the fallback landed: the inner call carries a short context and the outer wrapper owns the explanation. This gives the cask path the same shape. An official cask that 404s now reports the fetch failure without tap advice that does not apply to it.
75e7e92 to
4185f1f
Compare
Follow-up to #12645, which I got merged and which has been overtaken by the tap Ruby fallback. Not in a release yet — #12645 merged 2026-09-04, the newest release is v2026.9.1 — so the broken state can be fixed before it ships.
What went stale
#12645 rewrote two brew error messages to say that taps mostly do not publish API metadata and that the user should install with
brew. Direct tap support then landed, anddocs/bootstrap/packages/brew.mdnow documents the opposite:The formula side was reorganized at the same time and my message there was removed.
api.rsnow reads:The cask side was not.
fetch_cask_urlstill carries the long message, andfetch_caskwraps it with the equivalent Ruby-fallback explanation — so the inner text tells the user mise will not proxy tobrewfrom inside the very attempt that goes on to evaluateCasks/<token>.rb.The broken link
The message ends with
https://mise.jdx.dev/bootstrap/packages/brew.html#third-party-taps. That anchor does not exist.brew.mdonmainhas: Casks, Supported platforms, The prefix, Coexistence with a real Homebrew, Importing and pruning, How pouring works, Source formulae, Upgrades, Limitations.@coderabbitai flagged this on #12645 and I was wrong to push back on it. My argument was that #12644 would add the section and would merge first. #12644 is being closed — the tap fallback replaced its premise — so the anchor is never going to appear. It was the only reference to it in the repository; after this change there are none.
Change
One
wrap_err_with, matchingapi::formula:fetch_cask_urlhas three callers, and the shorter text reads correctly for each:debug!)brew-cask: x unavailable in parent tap metadata (failed to fetch Homebrew cask 'x': …){api_err}published cask metadata was unavailable (failed to fetch Homebrew cask 'x': …) and mise could not evaluate Casks/x.rb_ => return Err(api_err)failed to fetch Homebrew cask 'x': <http error>The third one matters beyond tidiness.
fetch_cask_urlis shared, so a mistyped official token —brew-cask:firefx— was answered with advice about third-party taps. That is the defect #12645 set out to fix, and it fixes more cleanly by having the shared function say less rather than by scoping its explanation.No test
Saying so rather than leaving it to be noticed:
src/ande2e/formost taps do not publish,will not proxyandfailed to fetch Homebrew caskhits only the implementation line itself.src/system/packages/brew/— nomockito, no#[tokio::test];cask/tests.rsis 7400 lines of synchronous tests over pure functions. Introducing the first one to assert a message string seemed disproportionate for text that is expected to keep changing.I cannot build locally, so CI is the first execution.
AI-assisted — Tool: Claude Code; model: anthropic/claude-opus-5; version: 2.1.236.
Summary by CodeRabbit