-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
system_config: typed: strict
#21124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
system_config: typed: strict
#21124
Conversation
Related to #17297 Signed-off-by: botantony <antonsm21@gmail.com>
There was a problem hiding this 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: truetotyped: strictin all three files - Added type signatures (
sig) to previously untyped methods - Added
initializemethods to declare instance variables withT.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>
Rylan12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
MikeMcQuaid
left a comment
There was a problem hiding this 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!
brew lgtm(style, typechecking and tests) with your changes locally?Related to #17297