Adopting Sorbet at Scale - Shopify
Nov 19, 2020

Summary
This post details the adoption of Sorbet for static typing in Shopify's Ruby monolith, including the development of open-source tooling like RuboCop Sorbet, Tapioca for RBI generation, and Spoom for programmatic Sorbet interaction. It also shares lessons learned regarding the importance of full coverage, the dangers of `typed: ignore`, and the benefits realized even at `typed: false`, such as preventing `NameErrors` and finding dead code. The post emphasizes an empirical approach to measuring the impact of typing on production errors, using the internal `dev` tool as a case study.
More from the Code Modularity and Boundary Enforcement trail
- A Packwerk Retrospective - Shopify
- Focus On Behavior, Not State, for a More Maintainable Codebase - Shopify
- Building a Business System Integration and Automation Platform at Shopify - Shopify
- Shopify-Made Patterns in Our Rails Apps - Shopify
- Remove Circular Dependencies by Using Dependency Injection and the Repository Pattern in Ruby - Shopify