-
Notifications
You must be signed in to change notification settings - Fork 133
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
Bad RBI for activerecord when the bundle includes flipper-active_record 1.3.1 #2016
Comments
I've reproduced this issue. It is a bug/edge case in the mixin tracker logic. Basically, tapioca's mixin tracker attempts to attribute every mixin ( The Here's the backtrace we get from those mixins:
The line that says
I've also reproduced this in a test. I don't think we have the bandwidth to work on this immediately. @olivier-thatch if you want to work on it, please go ahead, otherwise we will address it once some higher-priority work on our team has wrapped up. |
Thanks for looking into this @egiurleo. I probably won't be able to work on this, but might take a stab at it if I can find the bandwidth. (Also a good opportunity to learn more about Tapioca's internals.) As a rough workaround, we can just delete the incorrect lines from |
(Environment: Ruby 3.3.4, Rails 7.1, Sorbet 0.5.11558, Tapioca 0.16.2.)
Our gem bundle includes the
flipper
andflipper-active_record
gems. After upgrading both gems from 1.3.0 to 1.3.1 and regenerating gem RBIs, we ended up with the following at the end of the RBI for activerecord (sorbet/rbi/gems/activerecord@7.1.3.4.rbi
):There are two issues here:
sorbet/rbi/gems/flipper-active_record@1.3.1.rbi
rather thansorbet/rbi/gems/activerecord@7.1.3.4.rbi
.::ActiveRecord::Base::GeneratedRelationMethods
doesn't exist.I suspect this issue was caused by this change in Flipper's codebase, but hard to know for sure.
Happy to provide more information if needed, just let me know.
The text was updated successfully, but these errors were encountered: