Skip to content

bump: use refresh_for_tag for per-OS detection - #24127

Merged
bevanjkay merged 1 commit into
mainfrom
bump-failure-fix
Sep 29, 2026
Merged

bevanjkay merged 1 commit into
mainfrom
bump-failure-fix

Conversation

@krehel

@krehel krehel commented Sep 29, 2026 •

Copy link
Copy Markdown
Member
  • Casks with macOS-version blocks such as cd-to have no version when evaluated on Linux, so a bare CaskLoader.load raised CaskInvalidErrorand aborted the whole brew bump --auto autobump run.
  • refresh_for_tag already returns nil for tags a cask cannot be evaluated for, which falls back to arch-only resolution as before.

This should fix Cask autobump failures that appear to have been accidentally introduced in #24111.

See: https://github.com/Homebrew/homebrew-cask/actions/runs/36591168962


  • Have you followed our Contributing guidelines?
  • Have you checked for other open Pull Requests for the same change?
  • Have you explained what your changes do? Performance claims (e.g. "this is faster") must include brew benchmark results.
  • Have you explained why you'd like these changes included, not just what they do?
  • For bug fixes, have you given step-by-step brew commands to reproduce the bug?
  • Have you written new tests (excluding integration tests)? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) locally?

  • I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.

Fable 5 Max with manual review, brew lgtm --online.

- Casks with macOS-version blocks such as `cd-to` have no `version`
  when evaluated on Linux, so a bare `CaskLoader.load` raised
  `CaskInvalidError`and aborted the whole `brew bump --auto`
  autobump run.
- `refresh_for_tag` already returns `nil` for tags a cask cannot be
  evaluated for, which falls back to arch-only resolution as before.
Copilot AI lite review requested due to automatic review settings September 29, 2026 18:22

@MikeMcQuaid MikeMcQuaid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, thanks!

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

馃煛 Changes recommended

The initial cask load can still fail before platform-aware refreshing, and the test does not exercise that Linux path.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
What changed in this PR

Updates brew bump to use refresh_for_tag for platform-specific cask version detection and adds regression coverage.

Changes:

  • Refreshes casks per OS and architecture tag.
  • Adds coverage for macOS-only version blocks.
File Description
Library/鈥婬omebrew/鈥媡est/鈥媎ev-cmd/鈥媌ump_spec.rb Adds regression tests for platform-specific cask resolution.
Library/鈥婬omebrew/鈥媎ev-cmd/鈥媌ump.rb Updates per-OS cask version detection.

馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread Library/Homebrew/dev-cmd/bump.rb
@MikeMcQuaid
MikeMcQuaid added this pull request to the merge queue Sep 29, 2026
@MikeMcQuaid
MikeMcQuaid removed this pull request from the merge queue due to a manual request Sep 29, 2026
@bevanjkay
bevanjkay added this pull request to the merge queue Sep 29, 2026
Merged via the queue into main with commit 055b1cd Sep 29, 2026
54 of 55 checks passed
@bevanjkay
bevanjkay deleted the bump-failure-fix branch September 29, 2026 23:53
@waldyrious

waldyrious commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Apologies for introducing this bug! 馃槼 馃檱 Any tips for avoiding similar issues with future contributions? Note that I can only test locally on Linux.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants