Skip to content

formula: handle future deprecation and disable dates#21644

Merged
MikeMcQuaid merged 1 commit intomainfrom
future-disable
Mar 1, 2026
Merged

formula: handle future deprecation and disable dates#21644
MikeMcQuaid merged 1 commit intomainfrom
future-disable

Conversation

@cho-m
Copy link
Member

@cho-m cho-m commented Mar 1, 2026

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew lgtm (style, typechecking and tests) with your changes locally?

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

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 any deprecate! and immediately deprecates the formula.

Copilot AI review requested due to automatic review settings March 1, 2026 00:57
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 @deprecated immediately 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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks @cho-m!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Mar 1, 2026
Merged via the queue into main with commit d3034fa Mar 1, 2026
44 of 45 checks passed
@MikeMcQuaid MikeMcQuaid deleted the future-disable branch March 1, 2026 13:32
cho-m added a commit that referenced this pull request Mar 6, 2026
Previous behavior before #21644

This allows providing a single `replacement_formula:` on the `disable!`
stanza rather than duplicating it in both `disable!` and `deprecate!`.
cho-m added a commit that referenced this pull request Mar 6, 2026
Previous behavior before #21644

This allows providing a single `replacement_formula:` on the `disable!`
stanza rather than duplicating it in both `disable!` and `deprecate!`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants