The RBIs auto-generated by Tapioca can conflict with hand-written annotations, such as from RBI central. This causes Sorbet to complain about method redefinition, with error 4010.
We should find a way to minimize or fix these collisions.
Solution ideas
1. Skip auto-generation for methods with annotations
Concern: the real method's declaration (i.e. the implementation code from the gem) can change in a way that makes the hand-written annotation stale/incorrect.
Solution idea: associate the hand-written annotation to a copy of the method declaration. If that declaration doesn't match what's declared by the gem, then we know that it went stale.
2. Improve auto-generation, to require fewer annotations
Lots of dynamically defined methods end up with (*args, **kwargs, &block) declarations. If we can improve on these, we'd have less of a need for manual annotations in the first place.
The RBIs auto-generated by Tapioca can conflict with hand-written annotations, such as from RBI central. This causes Sorbet to complain about method redefinition, with error 4010.
We should find a way to minimize or fix these collisions.
Solution ideas
1. Skip auto-generation for methods with annotations
Concern: the real method's declaration (i.e. the implementation code from the gem) can change in a way that makes the hand-written annotation stale/incorrect.
Solution idea: associate the hand-written annotation to a copy of the method declaration. If that declaration doesn't match what's declared by the gem, then we know that it went stale.
2. Improve auto-generation, to require fewer annotations
Lots of dynamically defined methods end up with
(*args, **kwargs, &block)
declarations. If we can improve on these, we'd have less of a need for manual annotations in the first place.