Repository navigation
info: show build deps for source installs - #24258
Merged
MikeMcQuaid merged 1 commit intoOct 14, 2026
Merged
Conversation
HaraldNordgren
marked this pull request as ready for review
October 14, 2026 12:58
MikeMcQuaid
reviewed
Oct 14, 2026
MikeMcQuaid
left a comment
Member
There was a problem hiding this comment.
Thanks, great idea, one wee chance for related scout-rule cleanup.
- `kegs.all?` is vacuously true with no kegs installed, so `brew info` hid build deps even when `brew install` would build from source - the guard also re-implemented `formula_installs_from_source?` inline; call it instead, with the other OS check moved inside, so the build deps line and "Installs from source: yes" always agree
HaraldNordgren
force-pushed
the
info-build-deps-no-bottle
branch
from
October 14, 2026 13:45
13c102f to
ede89af
Compare
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.
On macOS 12, which Homebrew no longer builds bottles for,
brew info ccachesays "Installs from source: yes" but lists only the 6 runtime dependencies.brew install --dry-run ccachethen wants to install or upgrade 21 formulae (includinggcc,llvm,rustandruby) and nothing inbrew infohints where they come from.The build dependency line should only be hidden when a bottle will be poured, but
kegs.all? { |keg| keg.tab.poured_from_bottle }is vacuously true when nothing is installed, so since b796fdc it has been hidden for every uninstalled formula. The check now only applies to installed kegs and otherwise reusesformula_installs_from_source?, so the build dependency line and "Installs from source: yes" always agree.To reproduce, run
brew info ccacheon macOS 12, orbrew infoon any uninstalled formula without a bottle for your platform.Before:
After:
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Claude Opus 4.8 and Claude Opus 5.5) traced the cause, wrote the fix with its test and drafted this description. Verified with
brew typecheck,brew styleon the changed files,brew tests --only=cmd/info(the new spec fails onmainand passes with the fix) and thebrew info ccachebefore/after above, captured on macOS 12.