autoremove: handle runtime dependencies#21574
Draft
wu21-web wants to merge 15 commits intoHomebrew:mainfrom
Draft
autoremove: handle runtime dependencies#21574wu21-web wants to merge 15 commits intoHomebrew:mainfrom
wu21-web wants to merge 15 commits intoHomebrew:mainfrom
Conversation
Added handling for runtime dependencies in autoremove.
Ensures build dependencies are only kept for formulae built from source, not for bottles
Added mock for `runtime_dependencies` to avoid InstanceDouble errors in tests. Get rid of test failure in CI workers.
MikeMcQuaid
reviewed
Feb 14, 2026
Member
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks good so far! Please keep this in the same PR and don't open new PRs, instead just squash your history if things get messy.
MikeMcQuaid
reviewed
Feb 14, 2026
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
Member
|
@wu21-web please ensure you:
|
Author
|
OK. Thanks for the tip. |
Update styling
Fix brew styling
Author
|
@MikeMcQuaid Hi! Job 63646434598 is failing because Homebrew already has formulae installed when the workflow runs. We have to modify the test.yml to include with.uninstall = true to remove pre installed brew formulas. |
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.
Fixes #21511
brew lgtm(style, typechecking and tests) with your changes locally?Yes. Github Copilot was used in some debugging and styling modifications. I came up with the fix. I referenced sobert docs to verify the changes applied.
I noticed that the previous solution of modifying cleanup.rb in /Library/Homebrew/cmd and /Library/Homebrew/ is over-complicated and incorrect. Modifying autoremove.rb in libutils would be much easier.