Homebrew / brew

🍺 The missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
40.23k stars 9.44k forks source link

Show cask dependencies with `brew deps` and `brew info` #17600

Open wickles opened 2 weeks ago

wickles commented 2 weeks ago

Verification

Provide a detailed description of the proposed feature

For casks the basic informational commands do not provide any information about dependencies.

❯ brew cat unity | grep depends
  depends_on cask: "unity-hub"
❯ brew deps unity
❯ brew info unity
==> unity: 2023.2.20f1,0e25a174756c
https://unity.com/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/u/unity.rb
==> Name
Unity Editor
==> Description
Platform for 3D content
==> Artifacts
Unity-2023.2.20f1.pkg (Pkg)
==> Analytics
install: 84 (30 days), 438 (90 days), 1,506 (365 days)

Homebrew should give basic information about dependencies in deps and info commands. For example it might look like this instead:

❯ brew deps unity
unity-hub
❯ brew info unity
==> unity: 2023.2.20f1,0e25a174756c
https://unity.com/
Not installed
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/u/unity.rb
==> Name
Unity Editor
==> Description
Platform for 3D content
==> Dependencies
unity-hub
==> Artifacts
Unity-2023.2.20f1.pkg (Pkg)
==> Analytics
install: 84 (30 days), 438 (90 days), 1,506 (365 days)

What is the motivation for the feature?

For formulae it is easy to get information about dependencies.

❯ brew cat git | grep depends_on
  depends_on "gettext"
  depends_on "pcre2"
    depends_on "linux-headers@5.15" => :build
    depends_on "openssl@3" # Uses CommonCrypto on macOS
❯ brew deps git
gettext
pcre2
❯ brew info git
==> git: stable 2.45.2 (bottled), HEAD
Distributed revision control system
https://git-scm.com
Not installed
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/g/git.rb
License: GPL-2.0-only
==> Dependencies
Required: gettext ✔, pcre2 ✔
==> Options
--HEAD
    Install HEAD version
==> Caveats
The Tcl/Tk GUIs (e.g. gitk, git-gui) are now in the `git-gui` formula.
Subversion interoperability (git-svn) is now in the `git-svn` formula.
==> Analytics
install: 155,171 (30 days), 435,482 (90 days), 1,522,816 (365 days)
install-on-request: 152,412 (30 days), 427,717 (90 days), 1,500,820 (365 days)
build-error: 25 (30 days)

How will the feature be relevant to at least 90% of Homebrew users?

It will be helpful to users to know what dependencies will be installed with a cask.

What alternatives to the feature have been considered?

N/A

MikeMcQuaid commented 2 weeks ago

Agreed, this would be a good addition.