Skip to content

Commit

Permalink
Merge pull request #1243 from Homebrew/relax-cache-invalidation
Browse files Browse the repository at this point in the history
  • Loading branch information
carlocab authored Oct 23, 2024
2 parents 4ed1093 + 08e518e commit 384c6ca
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lib/test_formulae.rb
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,15 @@ def artifact_cache_valid?(formula, formulae_dependents: false)
return false if sha.blank?
return false unless no_diff?(formula, sha)

formula.recursive_dependencies.all? do |dep|
recursive_dependencies = if formulae_dependents
formula.recursive_dependencies
else
formula.recursive_dependencies do |_, dep|
Dependency.prune if dep.build? || dep.test?
end
end

recursive_dependencies.all? do |dep|
no_diff?(dep.to_formula, sha)
end
end
Expand Down

0 comments on commit 384c6ca

Please sign in to comment.