formula: handle future deprecation and disable dates#21644
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts Formula deprecation/disable behavior to support specifying future deprecation/disable dates from upstream timelines, ensuring deprecate! isn’t overridden by a future disable!.
Changes:
- Update
Formula.disable!to only set@deprecatedimmediately when no deprecation date is already set. - Add specs covering
deprecated?/disabled?behavior across deprecate/disable dates when both directives are present.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| Library/Homebrew/formula.rb | Changes disable! behavior to avoid immediately deprecating when a deprecate! date is present. |
| Library/Homebrew/test/formula_spec.rb | Adds date-based tests for deprecated? and disabled? when both deprecate! and disable! are set. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Makes sense, thanks @cho-m!
Previous behavior before #21644 This allows providing a single `replacement_formula:` on the `disable!` stanza rather than duplicating it in both `disable!` and `deprecate!`.
Previous behavior before #21644 This allows providing a single `replacement_formula:` on the `disable!` stanza rather than duplicating it in both `disable!` and `deprecate!`.
brew lgtm(style, typechecking and tests) with your changes locally?We occasionally want to provide a future set of deprecation and disable dates based on upstream documented dates (e.g. security support, maintenance mode, end-of-life, etc.)
Currently
disable!overrides anydeprecate!and immediately deprecates the formula.