Sorbet at Grailed: Typing a Large Rails Codebase to Ship with...
summary
Grailed types a 150,000‑line Rails monolith with Sorbet to reduce nil errors and refactor fear, serving over 7 million users. Tooling includes Tapioca for RBI generation, Sorbet Rails for ActiveRecord signatures and a custom RBI generator using Parlor for service objects; runtime mismatches post‑deployment send Slack alerts rather than raising exceptions. Adoption reaches about 70% of calls typed while only ~8% of files remain untyped, and Dry Monads largely gets replaced.
AI-written summary · about
chapters (13)
- 0:00Start
- 2:30Changes
- 8:06Signature Types
- 13:02RBI's (Ruby Interface Files)
- 15:32Exhaustiveness checking with Enum
- 18:48First steps
- 20:33Evangelize and Enforce
- 21:51Type your Dynamic Code: Service Objects at Grailed
- 22:59Type your Dynamic Code: Breaking Things
- 23:54Type your Dynamic Code: Parlour to the Rescue
- 24:50Removing Dynamic Code
- 25:23Replace Result Monad with Type union
- 26:37Challenges We Still Face
related talks
33mAdopting Sorbet at Scale
31mStatic Type Checking in Rails with Sorbet
30mIntroducing Sorbet into your Ruby codebase
48mGradual typing for Ruby at Scale with Sorbet
41mSorbet: A type checker for Ruby 3 you can use today!
39mGradual typing of Ruby at Scale
24mType Checking with Sorbet
22mStatic typing with RBS in Ruby
