Support specifying replacement formulae in `deprecate!` or `disable!` calls
Verification
- [X] 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
A formula might do
deprecate! date: "3000-03-30", because: :unmaintained
or similarly with disable!. When this is set, brew info will show
Deprecated because it is not maintained upstream! It will be disabled on 3001-03-30.
We should add a new, optional, kwarg called replacement:, like so:
deprecate! date: "3000-03-30", because: :unmaintained, replacement: "better-software"
which will change the deprecation message to something like
Deprecated because it is not maintained upstream! It will be disabled on 3001-03-30.
Consider replacing it with:
brew install better-software
What is the motivation for the feature?
Some formulae are deprecated and replaced by a formula of a different name. For example, exa and eza.
See also discussion at Homebrew/homebrew-core#183953.
How will the feature be relevant to at least 90% of Homebrew users?
It might not be, but it'll improve the experience of users of formulae that are deprecated/disabled.
What alternatives to the feature have been considered?
Leaving our handling of deprecate! and disable! unchanged.
Great idea.
Implemented in https://github.com/Homebrew/brew/pull/18733, shipped in https://github.com/Homebrew/brew/releases/tag/4.4.5, documented in https://github.com/Homebrew/brew/pull/18810.