bump: avoid overwriting skip message with autobump - #23737
Merged
Conversation
The `skip_ineligible_formulae!` method in `brew bump` accepts both formulae or casks, so the name may be misleading on the surface. This renames the method to `skip_ineligible_package!`, to improve clarity.
`brew bump` will skip formulae if they're disabled or HEAD-only and skip casks if they're disabled or use `version :latest`. However, if a package is set to be autobumped, the autobump skip message will overwrite any previously-set skip message. bump (and thusly autobump) skips disabled packages, so giving an error message about autobump is less relevant and can be confusing to users. The aforementioned skip conditions should take precedence over autobump status, so this modifies the autobump skip logic to ensure it won't overwrite an existing skip.
Contributor
There was a problem hiding this comment.
馃煝 Approval recommended
The focused logic change is correct, all references were updated, and relevant behavior is covered by tests.
Pull request overview
Prevents brew bump from replacing higher-priority ineligibility messages with autobump messages.
Changes:
- Renames the package eligibility helper for formula and cask clarity.
- Preserves disabled, HEAD-only, and
version :latestskip reasons. - Expands unit coverage across eligibility scenarios.
File summaries
| File | Description |
|---|---|
Library/Homebrew/dev-cmd/bump.rb |
Preserves existing skip reasons and renames the helper. |
Library/Homebrew/test/dev-cmd/bump_spec.rb |
Adds comprehensive eligibility and message tests. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
馃挕 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
samford
force-pushed
the
bump-avoid-overwriting-skip-message
branch
from
September 2, 2026 00:01
f5947ed to
35a552b
Compare
krehel
approved these changes
Sep 2, 2026
Member
|
Thank you @samford! |
bevanjkay
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?I wrote tests for
skip_ineligible_package!to cover the existing logic and then used Claude Code (Opus 5, high) to write some additional tests to finish what I started (bringing the method to 100% coverage in the end). I reviewed and tested the changes (confirming it's what I would have written myself) and tweaked some small things. I could have done it manually but I wanted to see how the AI-produced version would compare.brew bumpwill skip formulae if they're disabled or HEAD-only and skip casks if they're disabled or useversion :latest. However, if a package is set to be autobumped, the autobump skip message will overwrite any previously-set skip message. bump (and thusly autobump) skips disabled packages, so giving an error message about autobump is less relevant and can be confusing to users. The aforementioned skip conditions should take precedence over autobump status, so this modifies the autobump skip logic to ensure it won't overwrite an existing skip.Output on
mainwith a disabled cask that was previously autobumped:Output using this PR:
In the process, I renamed the
skip_ineligible_formulae!method toskip_ineligible_package!, which makes it more clear that it's not a formula-only method. I also expanded the test coverage to 100% for the method, as the existing test only covered one of the possible skip scenarios (aversion :latestcask).