tapioca
tapioca copied to clipboard
The swiss army knife of RBI generation
Hello, I am trying to write a custom compiler for a gem that uses a DSL to add methods to Active Record model classes. The problem is that the DSL...
`bin/tapioca gem X` loads all the gems but it only regenerates RBIs for `X`. This could cause issues when `X` RBIs rely on definitions from another gem, `Y`. An example...
If a gem performs a dynamic mixin like: ```ruby Bar.include(Foo) ``` Tapioca can pick that up using the mixin tracker. However, if another gem later tries to trigger the same...
Tapioca version: 0.7.3 ``` has_many :session_participations def example T.reveal_type(session_participations) session_participations.each do |sp| T.reveal_type(sp) end end ``` When typechecking this code where session_participations are a relation of the model this code...
Referred from https://github.com/sorbet/sorbet/issues/6621 #### Input Model: ```ruby # typed: strict class Shortcode < ApplicationRecord after_initialize :set_defaults, if: :new_record? private def set_defaults self.code ||= SecureRandom.urlsafe_base64(10) end end # == Schema Information...
Since we invoke `gem` under the hood: https://github.com/Shopify/tapioca/blob/main/lib/tapioca/cli.rb#L32.
Some gems such as `parser` or `rubocop` are known to slowing down Tapioca RBI generation. While we are thinking about an alternative way to generate the documentation for all gems,...
For some (very large) gems Tapioca can take a while to generate the RBI file. While Tapioca is processing thousands of constants and methods, from the user point of view...
As of 28eae0fc08205c79089bef2b243e70ea35c25e1a , my app (which uses an engine), fails to load on rails (revision b945dfbb69c53c19575fd2c5d42c79ecb21196f7), with: ``` gems/zeitwerk-2.6.6/lib/zeitwerk/loader.rb:471:in `block (3 levels) in raise_if_conflicting_directory': loader (Zeitwerk::Error) # wants to...
Tapioca [skips particular gems](https://github.com/Shopify/tapioca/blob/559f365e825e9160896c14041fcef1fc6cbc67c2/lib/tapioca/gemfile.rb#L155-L165), which can be confusing. I ran into this when trying to add RBIs for `debug`. ``` % tapioca gem debug Requiring all gems to prepare for...