Skip to content

Commit

Permalink
deps command: add --include-implicit flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Moisan committed Dec 24, 2024
1 parent 882bb52 commit 16a1da9
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Library/Homebrew/cmd/deps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Deps < AbstractCommand
description: "Show the union of dependencies for multiple <formula>, 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 <formula>."
switch "--include-optional",
Expand Down Expand Up @@ -102,6 +104,7 @@ def run
!args.tree? &&
!args.graph? &&
!args.HEAD? &&
!args.include_implicit? &&
!args.include_build? &&
!args.include_test? &&
!args.include_optional? &&
Expand Down
2 changes: 2 additions & 0 deletions Library/Homebrew/cmd/uses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 <formula> as a `:build` dependency."
switch "--include-build",
description: "Include formulae that specify <formula> as a `:build` dependency."
switch "--include-test",
Expand Down
1 change: 1 addition & 0 deletions Library/Homebrew/dependencies_helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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?
Expand Down
3 changes: 3 additions & 0 deletions Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/deps.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/uses.rbi

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 16a1da9

Please sign in to comment.