Don't skip over abstract FrozenRecord classes#1099
Conversation
Morriar
left a comment
There was a problem hiding this comment.
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
abstractclasses 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 :)