tapioca icon indicating copy to clipboard operation
tapioca copied to clipboard

RBIs for different Rails gems are referencing each other even though there is no dependency

Open AxelTheGerman opened this issue 10 months ago • 0 comments

I'm trying to build an app that doesn't require all of Rails but only specific parts, e.g. activerecord.

According to its gem spec it only depends on activesupport and activemodel (with no further transitive dependencies into Rails).

However, running bin/srb tc on the RBIs generated by tapioca I'm getting the following errors:

$ bin/srb tc
sorbet/rbi/gems/[email protected]:8297: Unable to resolve constant ActionText https://srb.help/5002
    8297 |  include ::ActionText::Encryption
                    ^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8297: Unable to resolve constant ActionText https://srb.help/5002
    8297 |  include ::ActionText::Encryption
                    ^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8359: Unable to resolve constant ActiveStorage https://srb.help/5002
    8359 |  include ::ActiveStorage::Attached::Model
                    ^^^^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8359: Unable to resolve constant ActiveStorage https://srb.help/5002
    8359 |  include ::ActiveStorage::Attached::Model
                    ^^^^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8360: Unable to resolve constant ActiveStorage https://srb.help/5002
    8360 |  include ::ActiveStorage::Reflection::ActiveRecordExtensions
                    ^^^^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8360: Unable to resolve constant ActiveStorage https://srb.help/5002
    8360 |  include ::ActiveStorage::Reflection::ActiveRecordExtensions
                    ^^^^^^^^^^^^^^^

sorbet/rbi/gems/[email protected]:8361: Unable to resolve constant ActionText https://srb.help/5002
    8361 |  include ::ActionText::Attribute
                    ^^^^^^^^^^^^

[...]

Is this a known limitation that Rails can only be used as a whole with tapioca or something that can/should be fixed?

AxelTheGerman avatar Feb 11 '25 16:02 AxelTheGerman