|
|
|
|
|
by jez
1632 days ago
|
|
This article might help clear some things up: https://sorbet.org/blog/2020/07/30/ruby-3-rbs-sorbet tl;dr: - RBS files are what Ruby 3 uses to describe types in separate files - RBI files are what Sorbet uses to describe types in separate files - Sorbet invented its RBI file syntax before RBS files existed. RBI files use the same syntax for types and signatures as in type annotations that live inside `*.rb` source code with Sorbet. - We've been meaning to add support to Sorbet to consume both RBI files and RBS files, but we haven't had a chance to get around to it. If someone beat us to it and implemented support for RBS files in Sorbet that would be amazing! Shopify took an early stab at implementing an RBS parser in C++ for performance[1], but I'm not sure what the status of it is today. [1] https://github.com/Shopify/rbs_parser |
|