Repository navigation
Load legacy formula DSL in history walks - #24131
Merged
Merged
Conversation
Signed-off-by: Patrick Linnane <patrick@linnane.io>
carlocab
approved these changes
Sep 30, 2026
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The changes require final human review because they are too complex or risky for automated approval.
Review effort: Lite
Findings: None
What changed in this PR
Updates advisory history loading so legacy formula DSL evaluates against simulated platforms while preserving host behaviour elsewhere.
Changes:
- Adds simulated macOS/Linux historical API handling.
- Supports additional obsolete DSL constructs.
- Updates history and formula-version tests.
| File | Description |
|---|---|
| Library/Homebrew/vulns/history.rb | Updated as part of this pull request. |
| Library/Homebrew/test/vulns/history_spec.rb | Updated as part of this pull request. |
| Library/Homebrew/test/formula_versions_spec.rb | Updated as part of this pull request. |
| Library/Homebrew/test/dev-cmd/generate-vulns-advisories_spec.rb | Updated as part of this pull request. |
| Library/Homebrew/formula_versions.rb | Updated as part of this pull request. |
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
MikeMcQuaid
approved these changes
Sep 30, 2026
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.
Advisory history reconciliation needs every revision of a formula to load on all four simulated platforms. Obsolete DSL made many older revisions unloadable, and on macOS the Linux legs only loaded revisions using
MacOSby reading the host.In advisory walks,
MacOS.versionand retiredon_systemreleases now answer from the simulated target, with Linux getting the historicalNULLanswers. Other callers keep the hostMacOSAPI. Undateddeprecate!/disable!,build.include?, bottleprefix,cxxstdlib_check,ScriptFileFormulaandStrictSubversionDownloadStrategyalso load. Anything else still fails closed.107 of 112 previously unloadable core revisions now load on all four platforms, on macOS and Linux.
brew benchmarkresults.brewcommands to reproduce the bug?brew lgtm(style, typechecking and tests) locally?Claude Code (Opus 5.5) drafted the implementation and tests; I reviewed the diff, verified the new tests fail without the change and pass with it, and ran
brew lgtm --onlineplus targeted specs on macOS and Linux.