Conversation
There was a problem hiding this comment.
Pull request overview
This PR upgrades the migrator.rb file from typed: true to typed: strict mode in Sorbet, adding comprehensive type signatures throughout the codebase as part of the ongoing effort to improve type safety (#17297).
Key changes:
- Added type signatures to all class methods, instance methods, and error class constructors
- Added type annotations for all attr_reader declarations
- Used T.let with explicit types for all instance variable initializations to satisfy strict mode requirements
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- for MigratorNoOldpathError to String
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Thanks @hyuraku looking good so far! There's still a bunch of T.must (including those I didn't comment on) where I don't think there's a sufficient guarantee that it is non-nil. You can see a few examples I've provided to provide that guarantee.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
@hyuraku A few more T.must to cleanup.
MikeMcQuaid
left a comment
There was a problem hiding this comment.
Looks great, thanks @hyuraku! One more tiny tweak.
|
Thanks @hyuraku! |
|
@MikeMcQuaid |
brew lgtm(style, typechecking and tests) with your changes locally?part of #17297