Skip to content

Commit

Permalink
formula_auditor: disallow non-test rustup-init dependencies
Browse files Browse the repository at this point in the history
We want formulae to build with our `rust` formula instead of a random
toolchain downloaded with `rustup`.

Unfortunately, some formulae already do this, so let's gate the check
behind `--strict`. It should also prevent new formulae that build using
`rustup` from being added.

This should hopefully prevent PRs like Homebrew/homebrew-core#119832
from being merged.
  • Loading branch information
carlocab committed Jul 11, 2023
1 parent 18b4fc4 commit bb3c6a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@ def audit_deps

next unless @core_tap

if @strict && dep.name == "rustup-init" && !dep.test?
problem "Formulae should use `rust` instead of `rustup-init` to build"
end

unless dep_f.tap.core_tap?
problem <<~EOS
Dependency '#{dep.name}' is not in homebrew/core. Formulae in homebrew/core
Expand Down

0 comments on commit bb3c6a8

Please sign in to comment.