Repository navigation
Add explicit package source loading APIs - #24438
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Shared package-name rules Library/Homebrew/package_constants.rb, Library/Homebrew/tap_constants.rb, Library/Homebrew/utils/path.rb, Library/Homebrew/bundle/dsl.rb, Library/Homebrew/linkage_checker.rb, Library/Homebrew/requirement.rb, Library/Homebrew/services/*, Library/Homebrew/shims/super/cc, related specs |
A shared package-name pattern and package-reference validation are added. Package matching in tap constants, Bundle, linkage, requirements, services, and the compiler shim uses the shared pattern. Tests cover invalid package names and service labels. |
Registered tap path resolution Library/Homebrew/utils/path.rb, Library/Homebrew/tap.rb, Library/Homebrew/test/package_loader_api_spec.rb |
Tap path lookup identifies registered formula or cask source files, including paths within symlinked checkouts. Formula and cask file lists are sorted. Specs cover unregistered paths, registered audit files, and symlinked checkouts. |
Formula source and bottle loading Library/Homebrew/formulary.rb, Library/Homebrew/test/package_loader_api_spec.rb |
Formulary adds selected-path, tap-path, and bottle loading. Resolution applies installed-spec state to formulas loaded by path or name. Specs cover explicit formula paths and bottle loading. |
Cask source and content loading Library/Homebrew/cask/cask_loader.rb, Library/Homebrew/cask/url.rb, Library/Homebrew/test/package_loader_api_spec.rb |
CaskLoader adds selected-path, tap-path, content, and name-based loading. Content evaluation checks for a Cask result. URL handling checks that the caller path is a file before reading it. |
Merge Risk: 
Minimal · up to 0726d
-
The identified loading regressions are resolved, and no actionable merge-blocking risk remains.
Pre-merge checks: 
4
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.
8adf5dd to
6e6aa11
Compare
7ed4b44 to
a2c7e05
Compare
- Add private path, tap-path, bottle and content entry points so Homebrew/brew callers can choose their source explicitly. - Keep explicit bottle loading independent of the implicit path policy. - Share source resolution without changing the existing default loader selection or path policy. - Share package-name matching across loaders, bundle, services and compiler shims, rejecting commas and preserving capture groups. - Reuse shared tap and package patterns for bundle normalisation. - Sort cached tap file lists once before binary-searching them and avoid reading unrelated tap lists for symlinked checkouts. - Cover registered tap paths, symlinked CI checkouts and explicit source loading before migrating callers.
a2c7e05 to
0726d8c
Compare
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Codex with GPT 6 Astra at High effort, with local review and testing.