Skip to content

Conversation

@botantony
Copy link
Member

  • 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?

Related to #17297

Related to #17297

Signed-off-by: botantony <antonsm21@gmail.com>
Copilot AI review requested due to automatic review settings November 21, 2025 21:30
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 the Sorbet type checking level from typed: true to typed: strict for system_config.rb and its OS-specific extensions. The change aims to improve type safety by adding explicit type signatures to all methods and declaring instance variables with T.let.

Key Changes:

  • Changed type sigil from typed: true to typed: strict in all three files
  • Added type signatures (sig) to previously untyped methods
  • Added initialize methods to declare instance variables with T.let

Reviewed changes

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

File Description
Library/Homebrew/system_config.rb Upgraded to strict typing; added signatures for clang, clang_build, describe_path, and config dump methods; added initialize method to declare instance variables
Library/Homebrew/extend/os/mac/system_config.rb Upgraded to strict typing; added signatures for Mac-specific methods (xcode, clt, describe_clang) and config methods; added initialize method
Library/Homebrew/extend/os/linux/system_config.rb Upgraded to strict typing; added signatures for Linux-specific methods (host_glibc_version, host_gcc_version, formula_linked_version, etc.)

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

Signed-off-by: botantony <antonsm21@gmail.com>
Copy link
Member

@Rylan12 Rylan12 left a comment

Choose a reason for hiding this comment

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

Nice work!

@botantony botantony added this pull request to the merge queue Nov 22, 2025
Merged via the queue into main with commit d47a45b Nov 22, 2025
35 checks passed
@botantony botantony deleted the system_config_strict_type branch November 22, 2025 23:58
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.

Great work, thanks @botantony!

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