tapioca
tapioca copied to clipboard
The swiss army knife of RBI generation
## The Problem The `tapioca` compiler for ActiveRecord models makes most columns nilable, ignoring database constraints. This is correct on paper, because when you call `Model.new` none of those would...
I noticed in the rbi generated for activesupport, the `source` annotation above classes in `core_ext` can be only partially true, because it is picking a single source when there is...
### Motivation This proof of concept aims to solve the problem of versioning RBIs. Up until now, there is no default way to write RBI for different versions of the...
Minor nit: ``` Duplicated RBI for ::RubyVM::YJIT::enabled?: * https://github.com/sorbet/sorbet/tree/master/rbi/core/ruby_vm.rbi#L804 * sorbet/rbi/shims/core/ruby_vm.rbi:5:4-5:26 ``` Should we output the second entry as `sorbet/rbi/shims/core/ruby_vm.rb#5`? I don't think the column numbers are needed.
We run Tapioca verify commands in CI, but with some regularity notice that RBI changes are missed for DSLs when we run the dsl generation locally. Our `ci.yml` step on...
### Description After implementing the missing `fetch_multi_n_by_m` methods in https://github.com/Shopify/tapioca/pull/1758 I have found out that the method signature isn't always correct as shown in this example from `cache_attribute`: https://github.com/Shopify/identity_cache/blob/main/lib/identity_cache/cached/attribute.rb#L82-L101 The...
When addressing https://github.com/ruby/prism/pull/1767, I noticed that all of the type annotations associated with `attr_reader` were being lost. I believe we may be incorrectly merging type signatures for attributes. Example: ```ruby...
### Motivation The algorithm used to force load all constants is vulnerable to an infinite loop. I hit just such a case when trying to bootstrap sorbet with tapioca in...
### Motivation Which creates a strongly-typed sig for `#context`, if the context class was customized via the `context_class` DSL. For Shopify employees, please see the timeline for a link to...
### Motivation I was migrating from sorbet-rails and couldn't find a migration path for `RelationType`. I searched the Slack channel and came up with this suggestion. I figured it would...