Sorbet at Grailed: Typing a Large Rails Codebase to Ship with... by Jose Rosello
Sorbet at Grailed: Typing a Large Rails Codebase to Ship with Confidence by Jose Rosello Called “downcase” on nil? Forgot to return the right object in one of your logic branches? Called “first” on a String instead of an Array and spent half an hour trying to figure out why a single character was getting passed around everywhere? At Grailed, these situations were not uncommon. We are the largest marketplace for luxury men's fashion, with over 7 million users, and a growing Rails codebase that spans hundreds of thousands of lines. Before typing, changes to core interfaces often required creative grepping, modification of type checking unit tests, and updating brittle type documentation. Ever since we started gradually typing our codebase with Sorbet, we’ve been able to make intrusive changes faster and confidently. In this talk, we’ll walk you through our prior art, challenges, learnings, and big benefits of typing our codebase.