-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Next gen api formula json v3 #16541
Merged
apainintheneck
merged 7 commits into
Homebrew:master
from
apainintheneck:next-gen-api-formula-json-v3
Feb 4, 2024
Merged
Next gen api formula json v3 #16541
apainintheneck
merged 7 commits into
Homebrew:master
from
apainintheneck:next-gen-api-formula-json-v3
Feb 4, 2024
Commits on Feb 4, 2024
-
This will be used internally to generate a slimmer api hash representation of formulas that will require less space and be faster to load. Changes: - Added #to_api_hash - Modified #to_hash_with_variations to work with both #to_hash and #to_api_hash - Modified #bottle_hash to have compact representation for the api hash - Added #urls_hash to share url hash generation logic between the hash methods
Configuration menu - View commit details
-
Copy full SHA for c1d85bf - Browse repository at this point
Copy the full SHA c1d85bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2dd80b - Browse repository at this point
Copy the full SHA d2dd80bView commit details -
formula: share dependencies serialization logic
Note: This changes where the "head_dependencies" key in the hash shows up but not the hash's contents. "head_dependencies" now shows up directly after all of the other dependency keys. Before it was always at the end of the hash after variations.
Configuration menu - View commit details
-
Copy full SHA for 6960973 - Browse repository at this point
Copy the full SHA 6960973View commit details -
dev-cmd/generate-formula-api: generate homebrew-core.json
This adds the code to generate the homebrew-core.json file which represents the entire tap instead of just the previous array of formula hashes. Any shared logic has been moved into the top-level hash scope including aliases, renames, tap_git_head and tap_migrations. I also added a check to skip adding the variations hash to the api hash if it is empty. Now we're down to 10MB from 24MB!!!
Configuration menu - View commit details
-
Copy full SHA for ba3a0f8 - Browse repository at this point
Copy the full SHA ba3a0f8View commit details -
- move caveats serialization to a method - remove unnecessary nesting where the hash would only have one key Also, removed comment about checking disable and deprecation reasons.
Configuration menu - View commit details
-
Copy full SHA for d9a98ac - Browse repository at this point
Copy the full SHA d9a98acView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c503cd - Browse repository at this point
Copy the full SHA 3c503cdView commit details -
formula: change how
#to_hash
is defined for backwards compatibilityNow the output of commands like `brew info --json=` and `brew generate-formula-api` should be the same as before along with the additional files for the internal API. Before this commit the hash key order had changed.
Configuration menu - View commit details
-
Copy full SHA for 54b54b7 - Browse repository at this point
Copy the full SHA 54b54b7View commit details
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.