Gradual typing for Ruby at Scale with Sorbet
summary
Sorbet is a gradual typechecker built for Stripe’s multi‑million‑line Ruby monorepo and it measurably improves developer workflow by providing fast batch and IDE responses while remaining open source. It implements a frozen global state with a compact symbol table, separates cheap syntactic index passes from a slower global resolver, compiles Ruby into a small control‑flow IR, and uses fuzzing plus sanitizers and many sanity checks. Performance targets include ~100k lines/sec per core (batch), 5–9 ms IDE responses and ~30 ms cold startup; resolver sits near 300 ms on a large repo.
AI-written summary · about
chapters (8)
- 0:00Start
- 1:34Collaboration
- 3:19Fast
- 7:06Core datastructures
- 10:45Index phases
- 17:19Typecheck phases
- 24:51How do we test it?
- 29:08How do we test it: Sanity checks
related talks
39mGradual typing of Ruby at Scale
41mSorbet: A type checker for Ruby 3 you can use today!
32mGradual Typing in Ruby - A Three Year...
31mStatic Type Checking in Rails with Sorbet
30mSorbet at Grailed: Typing a Large Rails Codebase to Ship with...
30mIntroducing Sorbet into your Ruby codebase
33mAdopting Sorbet at Scale
30mCompiling Ruby to Native Code with Sorbet & LLVM
