Making Sorbet compatible with Ruby 3.2
Sorbet, an open-source gradual type checker for Ruby, has become an essential tool for developers at Shopify. However, when the Shopify monolith was upgraded to Ruby 3.2, Sorbet needed to be updated to support the new features introduced in this version.
In a recent blog post, Emily Samp from the Ruby Developer Experience team at Shopify explains the work they did to make Sorbet compatible with Ruby 3.2. The post provides an overview of Sorbet's architecture and the changes made to the Sorbet pipeline to support the new features.
One of the significant syntax changes in Ruby 3.2 was the introduction of anonymous argument forwarding. To support this feature, Sorbet's parser grammar had to be updated. The parser is the first step in the Sorbet pipeline, converting Ruby code into an abstract syntax tree for further processing and type checking.
The article also highlights the importance of understanding the different stages of the Sorbet pipeline when updating Sorbet to support new features in Ruby. By explaining the changes made to each stage, developers can gain insights into how to approach similar problems.
Overall, this article provides valuable information for developers using Sorbet and those interested in contributing to its development. It showcases the commitment of the Ruby Developer Experience team at Shopify to deliver a state-of-the-art development experience for Rubyists.