Default to internal API#22546
Open
MikeMcQuaid wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR switches Homebrew’s runtime behavior to always use the internal packages API (instead of the public formula/cask JSON APIs), while keeping public/internal JSON generation concerns separated and de-emphasizing the now-compatibility-only HOMEBREW_USE_INTERNAL_API toggle.
Changes:
- Route runtime API consumers (formula/cask loading, search descriptions, tap autobump metadata, API prefetch) through
Homebrew::API::Internal. - Update
brew updateto download internal packages data by default and clean up legacy public API cache files. - Hide/remove end-user documentation for
HOMEBREW_USE_INTERNAL_APIand adjust tests/workflow packaging to match the new default.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
manpages/brew.1 |
Removes manpage documentation for HOMEBREW_USE_INTERNAL_API. |
docs/Manpage.md |
Removes corresponding docs entry for HOMEBREW_USE_INTERNAL_API. |
Library/Homebrew/env_config.rb |
Marks HOMEBREW_USE_INTERNAL_API as hidden and adjusts its metadata. |
Library/Homebrew/brew.sh |
Stops auto-exporting HOMEBREW_USE_INTERNAL_API in developer/devcmd contexts. |
Library/Homebrew/api.rb |
Makes API prefetch and names/aliases generation always use internal packages API. |
Library/Homebrew/cmd/update.sh |
Downloads internal/packages.<tag>.jws.json by default and removes legacy API cache files. |
Library/Homebrew/search.rb |
Uses internal packages data for description searches (formulae/casks). |
Library/Homebrew/tap.rb |
Switches autobump candidate data sourcing to internal API hashes. |
Library/Homebrew/formulary.rb |
Removes regular API loading path; formula API loading now uses internal structs/hashes. |
Library/Homebrew/cask/cask_loader.rb |
Removes regular API loading path; cask API loading now uses internal structs/hashes. |
Library/Homebrew/test/search_spec.rb |
Updates search tests to stub internal API hashes and use names key for casks. |
Library/Homebrew/test/env_config_spec.rb |
Updates expectations around use_internal_api? interaction with HOMEBREW_NO_INSTALL_FROM_API. |
Library/Homebrew/test/cmd/update_spec.rb |
Adds coverage that update fetches internal packages API by default. |
Library/Homebrew/test/cask/cask_loader/from_api_loader_spec.rb |
Adjusts cask loader tests to force source-loading via HOMEBREW_NO_INSTALL_FROM_API and removes regular-API contexts. |
.github/workflows/release.yml |
Simplifies release cache population to align with internal API being the runtime default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
365e588 to
573e4ab
Compare
573e4ab to
178ba5a
Compare
178ba5a to
edc21bc
Compare
- Avoid the regular JSON API at runtime now that the internal package data is the supported default. - Keep public and internal JSON generation separate so website data continues to be produced. - Hide `HOMEBREW_USE_INTERNAL_API` because it is only an internal compatibility toggle now.
edc21bc to
d5cd22d
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.
Fixes #19204
HOMEBREW_USE_INTERNAL_APIbecause it is only an internal compatibility toggle now.brew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review and testing.