Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
AxelTheGerman opened this issue Feb 11, 2025 · 0 comments

Comments

@AxelTheGerman
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant