| What it is | Extracts Ruby code from view templates (ERB, etc.) for Sorbet type-checking, with LSP support | Extracts Ruby code from ERB files so you can run Sorbet over them | A Sorbet build for Rails apps that type-checks specs, factories, and ERB views |
| Features | - compiles ERB templates to typed Ruby files and type-checks them with Sorbet (sv tc)
- source maps between templates and generated Ruby for error locations in the template
- LSP proxy server with hover, completion and go-to-definition in .erb files
- VS Code extension
- recompiles a controller's templates when the controller file is saved
- locals and locals_sig magic comments for typed partial locals
- ViewComponent erb_template heredoc support
- Tapioca DSL compiler for helper method RBIs and controller instance variable types (via srb_lens)
- All 10 features
| - extracts Ruby from Rails ERB templates into Ruby files Sorbet can check
- generated code is scoped to the app's ApplicationController
- locals_sig magic comment gives partial locals Sorbet signatures (experimental)
- skips partials without strict locals unless skip_missing_locals is set
- YAML configuration with extra_includes for modules Tapioca doesn't cover
- nominal ViewComponent support
| - rspec plugin: spec-type modules, test_each loops, typed example params, let_it_be and before_all
- capybara and rswag DSLs as RSpec groups
- factory_bot plugin: checked factory, trait and attribute names, typed results
- active_admin plugin: binds register blocks to the DSL, view or controller
- erb_views plugin: ERB templates checked at typed: strict with typed ivars and partial locals
- rails plugin: model columns, associations, scopes, enums, job, mailer, helper, ViewComponent and Shrine methods from the app's code
- RBI generators that run inside the app
- plugin API for writing new rewriters (C++, Bazel)
|