Static Type Checking in Rails with Sorbet
summary
Claims Sorbet finds real bugs early, processes ~100,000 lines/sec, and integrates with editors; the team adds Sorbet to a 2,500-file Rails codebase in six months and generates RBI files via a new Sorbet-Rails gem that models Rails metaprogramming. Adoption yields over 90% files at typing levels and ~66% call-site coverage, uncovers typos and dead code (missing current_academic_year), and adds runtime features like Typed Params and CI/editor checks that work in production.
AI-written summary · about
chapters (12)
- 0:00Static type checking intro
- 2:21Why we adopted Sorbet
- 6:52Type checking Rails metaprogramming
- 9:14Sorbet Rails introduction
- 13:25Generating method signatures
- 16:03Models, mailers, background jobs
- 17:32Typed Params runtime
- 18:19Driving Sorbet adoption
- 23:33Step-by-step adoption
- 27:54Making types the norm
- 29:23Limitations and future work
- 30:30Q&A
related talks
24mType Checking with Sorbet
30mSorbet at Grailed: Typing a Large Rails Codebase to Ship with...
41mSorbet: A type checker for Ruby 3 you can use today!
48mGradual typing for Ruby at Scale with Sorbet
33mAdopting Sorbet at Scale
32mGradual Typing in Ruby - A Three Year...
30mIntroducing Sorbet into your Ruby codebase
22mStatic typing with RBS in Ruby
