Skip to content

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

Open
@AxelTheGerman

Description

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions