tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

The swiss army knife of RBI generation

Results 187 tapioca issues
Sort by recently updated
recently updated
newest added

I'm actually not 100% sure if this issue belongs here, in sorbet-rails, or somewhere else. Please redirect me to wherever would have responsibility for this! > [`ActiveStorage` has been designed...

Tapioca just assumes that the current project is a Rails application and tries to eager load it based on that assumption. However, our DSL generators could work in any codebase,...

enhancement

Would be nice to do something like: ``` $ tapioca dsl --file my_ruby_file.rb ``` And have it automatically generate the RBIs for the classes in the given ruby file. My...

enhancement

When using ActiveStorage macro methods like `has_many_attached` in model files, the type check fails with an error along the lines of: ``` app/models/my_model.rb: Method has_many_attached does not exist on T.class_of(MyModel)...

enhancement
good first issue

See [this Discourse thread](https://discourse.shopify.io/t/unit-test-class-for-helper-doesnt-recognize-helper-objects-methods/22293). Rails auto-_magically_ loads all `Helper` classes which Sorbet isn't picking up. (See [here](https://github.com/rails/rails/blob/main/actionview/lib/action_view/test_case.rb#L97)). We should create a Compiler which can properly handle these cases which will...

enhancement

Because view helpers are dynamically included by Rails, Sorbet is not aware that the modules will be included into certain classes. We can solve this by generating RBIs that add...

feature

`ActionDispatch::SystemTestCase` uses `method_missing` to utilize UrlHelpers https://github.com/rails/rails/blob/19e4b7a609e79b6be80b5355e4ff3882ad59f09e/actionpack/lib/action_dispatch/system_test_case.rb#L182. We can add a special case within UrlHelpers compiler to mixin the generated modules: ``` class ActionDispatch::SystemTestCase include GeneratedPathHelpersModule include GeneratedUrlHelpersModule end ```

enhancement

Currently, we do not require test files as a part of the DSL generation process. However, there are certain test classes that do have DSLs generated with meta-programming. One example...

enhancement

I created a brand new rails 7 project. The first thing I did was I added tapioca! I generated all the gem & dsl rbis, fixed all I could, but...

bug

As shown [here](https://guides.rubyonrails.org/testing.html#testing-helpers) ActionView test cases bring a lot of power to the test cases created by the user. Tapioca should generate as much as possible in the DSL's RBIs....

enhancement