Repository navigation
Use forwarding super when translating abstract sigs to RBS - #1028
Merged
Merged
Conversation
alexcrocha
force-pushed
the
ar-translate-abstract-sigs-super
branch
from
October 20, 2026 21:51
8a6bf93 to
b0984db
Compare
alexcrocha
force-pushed
the
ar-translate-abstract-sigs-super
branch
from
October 20, 2026 21:57
b0984db to
2055450
Compare
alexcrocha
marked this pull request as ready for review
October 20, 2026 21:58
paracycle
reviewed
Oct 20, 2026
Comment on lines
+259
to
+264
| Include abstract methods: | ||
|
|
||
| ```sh | ||
| spoom srb sigs translate --translate-abstract-methods | ||
| ``` | ||
|
|
Member
There was a problem hiding this comment.
Out of curiosity: Why is this not default now?
Contributor
Author
There was a problem hiding this comment.
I'm keeping it optional to maintain compatibility with older Sorbet versions. Let me know if I am being too conservative and this is not an issue, happy to make it the default in a follow-up
paracycle
approved these changes
Oct 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use forwarding
superbodies when translating abstract Sorbet signatures to RBS comments, matching sorbet/sorbet#10707.Motivation
Ruby can find a module's abstract method before an implementation inherited from a parent class. The previous generated
raise NotImplementedErrorbody prevents that implementation from being reached. A baresuperforwards arguments and blocks to the inherited implementation instead. Calling a method with no implementation raisesNoMethodError.Changes
superinstead ofraise NotImplementedErrorfor translated abstract methods.superso its own source passes the upgraded checker.Typechecking generated abstract-method bodies requires Sorbet 0.6.13580 or newer.