Skip to content

Conversation

@botantony
Copy link
Member

@botantony botantony commented Jan 7, 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?

Part of #17297

Copilot AI review requested due to automatic review settings January 7, 2026 17:02
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 upgrades three cask DSL files from typed: true to typed: strict Sorbet type checking, adding comprehensive type annotations to satisfy stricter type requirements.

  • Adds explicit type signatures for methods and instance variables across version, depends_on, and container DSL classes
  • Converts implicit type inference to explicit T.let declarations for constants and instance variables
  • Fixes a potential bug in invalid_characters method by adding explicit .to_s conversion

Reviewed changes

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

File Description
Library/Homebrew/cask/dsl/version.rb Upgraded to strict typing with method signatures, T.let for DIVIDERS constant, and explicit type conversions
Library/Homebrew/cask/dsl/depends_on.rb Upgraded to strict typing with detailed method signatures, converted attr_readers to methods with lazy initialization, and T.let annotations
Library/Homebrew/cask/dsl/container.rb Upgraded to strict typing with method signatures and T.let annotations for instance variables

💡 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.

Looks good thanks @botantony!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit dbaabfa Jan 8, 2026
37 checks passed
@MikeMcQuaid MikeMcQuaid deleted the cask/dsl-typed branch January 8, 2026 11:15
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