Skip to content

Conversation

@Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Dec 29, 2025

This PR adds deprecate_args and disable_args fields to the cask JSON API to reflect the as-written deprecation/disabling status of each cask. This will be used in a follow-up PR to accurately call deprecate! and disable! in casks based on what was actually called in the cask's ruby file rather than the status at JSON generation time.

Copilot AI review requested due to automatic review settings December 29, 2025 03:36
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

This PR adds deprecate_args and disable_args fields to the cask DSL and JSON API to capture the original arguments passed to deprecate! and disable! methods. This enables accurate reconstruction of these method calls in a follow-up PR, preserving the as-written deprecation/disabling status rather than the computed status at JSON generation time.

Key Changes:

  • Added deprecate_args and disable_args instance variables to store method arguments as hashes
  • Included proper type annotations for the new fields
  • Updated JSON test fixtures to reflect the new API structure

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
Library/Homebrew/cask/dsl.rb Added deprecate_args and disable_args to DSL_METHODS, attr_readers, initialization, and set them within the deprecate! and disable! methods to capture the original arguments
Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi Added Sorbet type signatures for the new deprecate_args and disable_args methods
Library/Homebrew/test/support/fixtures/cask/everything.json Added deprecate_args and disable_args fields with null values to the test fixture
Library/Homebrew/test/support/fixtures/cask/everything-with-variations.json Added deprecate_args and disable_args fields with null values to the variations test fixture
Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/cask/cask.rbi: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Rylan12 Rylan12 force-pushed the deprecate-disable-args-cask-api branch from 146fe4c to 5da8d72 Compare December 29, 2025 03:49
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.

Thanks!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 29, 2025
Merged via the queue into main with commit b473452 Dec 29, 2025
37 checks passed
@MikeMcQuaid MikeMcQuaid deleted the deprecate-disable-args-cask-api branch December 29, 2025 09:02
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.

3 participants