KEMBAR78
Add `Dependency#to_installed_formula` to access installed formula deps with `Formulary::resolve` by Rylan12 · Pull Request #20896 · Homebrew/brew · GitHub
Skip to content

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Oct 17, 2025

This PR extracts some of the changes from #20830

This PR adds Dependency#to_installed_formula, which uses Formulary::resolve instead of ::factory. Right now, this should not be any different because Formulary::resolve calls factory under the hood. This will be needed eventually, once resolve no longer calls factory.

@Rylan12 Rylan12 changed the title Add installed_* methods for calculating installed runtime deps Add Dependency#to_installed_formula to access installed formula deps with Formulary#resolve Oct 17, 2025
@Rylan12 Rylan12 changed the title Add Dependency#to_installed_formula to access installed formula deps with Formulary#resolve Add Dependency#to_installed_formula to access installed formula deps with Formulary::resolve Oct 17, 2025
Base automatically changed from tap-path-and-latest-formula to main October 17, 2025 15:45
@Rylan12 Rylan12 added this pull request to the merge queue Oct 17, 2025
@Rylan12
Copy link
Member Author

Rylan12 commented Oct 17, 2025

Maintainers: if this causes something to break, please ping me. I am lightly monitoring for the next several hours, and will try to fix forward if I can

Merged via the queue into main with commit 0b8eb66 Oct 17, 2025
44 checks passed
@Rylan12 Rylan12 deleted the add-installed-runtime-dep-methods branch October 17, 2025 18:18
@scpeters
Copy link
Contributor

I've been seeing brew test failures like the following since this was merged:

+ brew test osrf/simulation/gz-rendering6
Error: undefined method '[]=' for nil
Warning: Removed Sorbet lines from backtrace!
Rerun with `--verbose` to see the original backtrace
/usr/local/Homebrew/Library/Homebrew/dependency.rb:185:in 'Dependency.expand'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2456:in 'Formula#recursive_dependencies'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/test.rb:60:in 'block in Homebrew::DevCmd::Test#run'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/test.rb:40:in 'Array#each'
/usr/local/Homebrew/Library/Homebrew/dev-cmd/test.rb:40:in 'Homebrew::DevCmd::Test#run'
/usr/local/Homebrew/Library/Homebrew/brew.rb:101:in '<main>'

Build Status https://build.osrfoundation.org/view/gz-fortress/job/gz_rendering6-install_bottle-homebrew-amd64/674/

I'm not sure what it is about this formula that causes the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants