-
Notifications
You must be signed in to change notification settings - Fork 125
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
Don't skip over abstract FrozenRecord classes #1099
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LMK if you think I should add one
I think you can add a test under https://github.com/Shopify/tapioca/blob/main/spec/tapioca/dsl/compilers/frozen_record_spec.rb showing that we do not skip abstract classes anymore. At least to show that we do not skip them intentionally.
Did we test this PR agains our monolith? I think it might have a reason why we skip abstract classes. |
@rafaelfranca Vinicius suggested that offline. When I have time, I'll run it against core. I'll put this in draft until then. |
We also do this for descendants of |
We actually moved away from having that abstract base class. There were other edge-cases in FrozenRecord that made it more painful than it was worth. I won't have time to investigate this before BFCM, so perhaps we could just close this issue (Although not skipping them still might make sense as a default, unless we have an explicit reason to want to skip them) |
Motivation
On
shop-server
, we have anabstract!
base class that derives fromFrozenRecord::Base
.Currently, this class doesn't have an RBI file generated, because the FrozenRecord Tapioca compiler is explicitly skipping over abstract classes.
I don't think there's a reason not to include these, so let's just do it.
Tests
There wasn't a test to check that
abstract
classes are skipped. If there was one, I would have deleted it. I don't think there's a need to add a test to verify that's we're not not including abstract files, but LMK if you think I should add one anyway :)