You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drop sorbet-runtime dependency by migrating to RBS comment annotations (#68)
* Update gem rbis
* Modernize Sorbet tooling and pin rubocop-sorbet for new T.let cops
Bump sorbet, sorbet-runtime, tapioca, spoom, rbi, and rbs to current
versions and regenerate the gem RBIs to match.
Pin rubocop-sorbet to Shopify/rubocop-sorbet@7b7d3cb (post-#367 and
post-#372) so the not-yet-released Sorbet/RedundantTLetForLiteral and
Sorbet/RedundantTLet cops are available.
* Remove redundant T.let on literals via Sorbet cops
Apply Sorbet/RedundantTLetForLiteral and Sorbet/RedundantTLet
autocorrections. Sorbet infers the type of literal constants
automatically, so the explicit T.let wrappers were redundant.
* Migrate type annotations to RBS comments and drop sorbet-runtime
Replace Sorbet's runtime DSL with inline RBS comment annotations so the
gem no longer depends on sorbet-runtime at runtime, matching upstream
packwerk (Shopify/packwerk#455).
- Enable --parser=prism and --enable-experimental-rbs-comments in
sorbet/config
- Translate all sig blocks to #: RBS comments (via spoom)
- Convert the T::Struct Package classes to plain classes with
RBS-annotated attr_readers and keyword initializers
- Replace T.let / T.must / extend T::Sig with inline RBS annotations
- Drop require 'sorbet-runtime' and the sorbet-runtime gem dependency
* Trim rubocop config for the RBS migration
- Allow RBS inline annotation comments (Layout/LeadingCommentSpace)
- Set TargetRubyVersion to 3.2 (matches required_ruby_version), fixing
Lint/RedundantRequireStatement on the binstubs
- Remove disabled-cop entries that no longer have any violations,
including Style/TrivialAccessors (its Sorbet-sig rationale is moot now
that RBS makes annotated attr_readers clean)
* Bump minimum Ruby version to 3.3
The modernized Sorbet toolchain pulls in rbi 0.3.12, which requires
Ruby >= 3.3. Raise required_ruby_version and TargetRubyVersion to match.
0 commit comments