Description
Verification
- This issue's title and/or description do not reference a single formula e.g.
brew install wget
. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
Provide a detailed description of the proposed feature
Doing brew install docker
will install the Docker formula (and output a warning). brew install --cask docker
will install the Docker cask. This may make sense to Homebrew maintainers but, to many of our users, this is unnecessarily confusing. It also has resulted (and will, most likely) continue to result in many bugs over the years.
We now have the ability to rename both formulae and casks. We should make use of this to pick a better name for each of the formulae and casks with overlapping names and add an audit/cop to ensure that we do not backslide and accidentally add more in future.
More often than not, this should involve renaming the cask. Casks are (generally) much less popular than the formula. If the cask has higher analytics usage (or perhaps just "higher in the rankings" than the formula, however, it may make more sense to rename the formula. Docker has half the cask installs in 365 days than formula but: it's the 4th highest installed cask and the 38th formula. Possible renames could be docker-cli
or docker-desktop
.
Note: this will almost certainly require making changing to existing audits, documentation and name/token format.
CC @Homebrew/maintainers @Homebrew/core and @homebrew/cask for thoughts
What is the motivation for the feature?
Less confusion and fewer bugs on overlapping formulae/casks.
How will the feature be relevant to at least 90% of Homebrew users?
Removing the ability to fully understand the concept of formula and cask to just use Homebrew.
What alternatives to the feature have been considered?
- Do nothing
- Keep the shadowing but don't default to the formula and always require disambiguation.
- Only rename formulae.
- Only rename casks.
- Remove all shadowing casks.
Activity
SMillerDev commentedon Jun 25, 2024
I like this approach, though a combination with the rename is probably good. For example: the software in the Docker cask is referred to as "Docker Desktop" everywhere on the Docker website, so that's probably a better name.
krehel commentedon Jun 25, 2024
I second this. It may not make sense to rename all variations, but probably does for some, Docker being the notable example. I think keeping disambiguation is a good idea if it doesn't cause continued confusion, and does force a user decision.
If there's a desire to rename conflicting items: it's probably worthwhile to have a consistent scheme, TBD if this is a route decided. Keep the formula as-is with
name
, and have cask bename-prebuilt
,name-upstream
or something.MikeMcQuaid commentedon Jun 25, 2024
The reason I don't like this approach: we will need to pick a date when we start breaking e.g.
brew install docker
for everyone which sucks (given how much effort we go to e.g. handle renames, aliases, etc. gracefully).Agreed here. I think that's an easy case to fix.
We should avoid forcing user decisions in cases like this, particularly when we have analytics. We should decide for them and, if we install the wrong thing, they can choose to uninstall and install the right one.
I don't think it makes sense universally.
I know Homebrew/cask doesn't historically like
foo-app
but: this feels most appropriate when installing a.app
, to me.Docker is a nice example, though, of where "Docker Desktop" is actually the name that upstream uses, too.
brew install
refuses to install a formula from a tap with the same name as an already installed keg #17941cho-m commentedon Sep 25, 2024
In the current loader implementation, this is likely required as the old formula name will still be found before trying casks.
In order to rename a formula, we would want to adjust priority so that we select:
Or automatically drop old names after some timeframe (months/year).
MikeMcQuaid commentedon Sep 26, 2024
This all sounds ideal and I agree 👍🏻. I think a year should be enough to drop old names; if we want them to outlive that they should be an alias.
Rylan12 commentedon Sep 26, 2024
FWIW I think this should be the order we load in regardless of the approach since at this point since casks are equally as official as formulae
danielbayley commentedon May 28, 2025
@MikeMcQuaid This might sound stupidly simple, but when there is a conflict—and there is no obviously better alternative name—why not just add a
cask-*
prefix?MikeMcQuaid commentedon May 28, 2025
@danielbayley Yes, a prefix or a suffix would make sense here. I believe we've used
-app
as a suffix in the past for this.