From cbff83898e586c7a58d5580fc81e780cb7363682 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 19 Jan 2022 03:00:55 +0800 Subject: [PATCH 1/2] formula_auditor: audit for deprecated dependencies Closes #12748. --- Library/Homebrew/formula_auditor.rb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index a06941104d432..1a7292a244531 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -307,6 +307,13 @@ def audit_deps EOS end + if dep_f.deprecated? && !formula.deprecated? && !formula.disabled? + problem <<~EOS + Dependency '#{dep.name}' is deprecated but has un-deprecated dependents. Either + un-deprecate '#{dep.name}' or deprecate all of its dependents. + EOS + end + # we want to allow uses_from_macos for aliases but not bare dependencies if self.class.aliases.include?(dep.name) && spec.uses_from_macos_names.exclude?(dep.name) problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'." From 7c7a92e8fb0b80b23ece1baee618dd5326d139aa Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Fri, 29 Jul 2022 20:10:05 +0800 Subject: [PATCH 2/2] formula_auditor: clean up error wording --- Library/Homebrew/formula_auditor.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index 1a7292a244531..f7bbb09cc02d2 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -310,7 +310,7 @@ def audit_deps if dep_f.deprecated? && !formula.deprecated? && !formula.disabled? problem <<~EOS Dependency '#{dep.name}' is deprecated but has un-deprecated dependents. Either - un-deprecate '#{dep.name}' or deprecate all of its dependents. + un-deprecate '#{dep.name}' or deprecate it and all of its dependents. EOS end