Skip to content

Commit

Permalink
formula: add global caching for declared_runtime_dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo98 committed Sep 15, 2023
1 parent b2cf50b commit be2834a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Library/Homebrew/formula.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2579,7 +2579,8 @@ def setup_home(home)
# Returns a list of Dependency objects that are declared in the formula.
# @private
def declared_runtime_dependencies
recursive_dependencies do |_, dependency|
cache_key = "Formula#declared_runtime_dependencies" unless build.any_args_or_options?
Dependency.expand(self, cache_key: cache_key) do |_, dependency|
Dependency.prune if dependency.build?
next if dependency.required?

Expand Down

0 comments on commit be2834a

Please sign in to comment.