tapioca
tapioca copied to clipboard
The swiss army knife of RBI generation
### Motivation See https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-extract_associated - this returns an array and the return type unknown since it depends on the association passed in. ### Implementation Override when iterating over QUERY_METHODS to...
When running `tapioca dsl` on attributes with Postgres' `cidr` [type](https://www.postgresql.org/docs/current/datatype-net-types.html#DATATYPE-CIDR), it treats it as `T.untyped`. It looks like the underlying type in Rails is Ruby's `IPAddr`.
We already typecheck resulting RBIs to convert strictness to false: https://github.com/Shopify/tapioca/blob/ba2951e75fbea6bad8b4ea0641ea3df38eb9e60d/lib/tapioca/helpers/rbi_files_helper.rb#L86 Similarly if we run into a superclass redefinition error we can populate `sorbet/config` with `--suppress-payload-superclass-redefinition-for=ConstantName` to prevent typecheck errors....
### Motivation Currently, the tapioca default compilers load _after_ the user defined compilers. This makes it impossible to extend or monkey patch a default compiler without monkey patching the load...
### Motivation Closes https://github.com/Shopify/tapioca/issues/1822. See discussion there for full context. TL;DR: The current sigs are incorrect when given a block. ### Tests I believe I updated the spec here correctly.
The active record relations compiler generates incorrect sigs for `sum`. It is typed only allow the a first argument of a column name, but the active record defintion allows for...
### Motivation This doesn't quite fit in to the normal idea of a DSL, but I think it fits best here. Basically, because ripper isn't a normal gem and doesn't...
Code expects `EnumDescriptor` but generated files from tapioca includes `EnumDescriptorProto` not `EnumDescriptor`, so errors like the following show up. ``` sorbet/rbi/dsl/google/protobuf/field_descriptor_proto/type.rbi:9: Unable to resolve constant EnumDescriptor https://srb.help/5002 9 | sig...
When the parent process is killed during parallel execution the stack trace is unhelpful https://github.com/Shopify/tapioca/issues/1555. Can we extract the underlying trace? At the very least if we can't find the...
It would be really nice to be able to have types for inputs and results for `graphql-client` and it feels like it just requires gluing together some existing pieces of...