diff --git a/Library/Homebrew/cmd/deps.rb b/Library/Homebrew/cmd/deps.rb index fab09e12ac05e..a90e5d80d9d4c 100644 --- a/Library/Homebrew/cmd/deps.rb +++ b/Library/Homebrew/cmd/deps.rb @@ -31,6 +31,8 @@ class Deps < AbstractCommand description: "Show the union of dependencies for multiple , instead of the intersection." switch "--full-name", description: "List dependencies by their full name." + switch "--include-implicit", + description: "Include implicit dependencies used to download and unpack source files" switch "--include-build", description: "Include `:build` dependencies for ." switch "--include-optional", @@ -102,6 +104,7 @@ def run !args.tree? && !args.graph? && !args.HEAD? && + !args.include_implicit? && !args.include_build? && !args.include_test? && !args.include_optional? && diff --git a/Library/Homebrew/cmd/uses.rb b/Library/Homebrew/cmd/uses.rb index 5305925ffe72d..89b7be31c5e31 100644 --- a/Library/Homebrew/cmd/uses.rb +++ b/Library/Homebrew/cmd/uses.rb @@ -37,6 +37,8 @@ class UnavailableFormula < T::Struct switch "--eval-all", description: "Evaluate all available formulae and casks, whether installed or not, to show " \ "their dependents." + switch "--include-implicit", + description: "Include formulae that specify as a `:build` dependency." switch "--include-build", description: "Include formulae that specify as a `:build` dependency." switch "--include-test", @@ -73,6 +75,7 @@ def run use_runtime_dependents = args.installed? && !used_formulae_missing && + !args.include_implicit? && !args.include_build? && !args.include_test? && !args.include_optional? && diff --git a/Library/Homebrew/dependencies_helpers.rb b/Library/Homebrew/dependencies_helpers.rb index ab4241484159c..0c4276f7075b0 100644 --- a/Library/Homebrew/dependencies_helpers.rb +++ b/Library/Homebrew/dependencies_helpers.rb @@ -11,6 +11,7 @@ module DependenciesHelpers def args_includes_ignores(args) includes = [:required?, :recommended?] # included by default + includes << :implicit? if args.include_implicit? includes << :build? if args.include_build? includes << :test? if args.include_test? includes << :optional? if args.include_optional? diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/deps.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/deps.rbi index bb861fb4943db..def4127d1041b 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/deps.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/deps.rbi @@ -53,6 +53,9 @@ class Homebrew::Cmd::Deps::Args < Homebrew::CLI::Args sig { returns(T::Boolean) } def graph?; end + sig { returns(T::Boolean) } + def include_implicit?; end + sig { returns(T::Boolean) } def include_build?; end diff --git a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/uses.rbi b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/uses.rbi index f73b850e32910..ddb001e3cb298 100644 --- a/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/uses.rbi +++ b/Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/uses.rbi @@ -26,6 +26,9 @@ class Homebrew::Cmd::Uses::Args < Homebrew::CLI::Args sig { returns(T::Boolean) } def formulae?; end + sig { returns(T::Boolean) } + def include_implicit?; end + sig { returns(T::Boolean) } def include_build?; end