Support RBS comment translation on multi-name attrs - #973
Draft
KaanOzkan wants to merge 3 commits into
Draft
Conversation
Morriar
reviewed
Jul 16, 2026
Morriar
left a comment
Contributor
There was a problem hiding this comment.
I'm guessing this is related to Shopify/tapioca#2662. Shouldn't this be fixed at the sorbet-runtime layer instead?
Contributor
Author
|
@Morriar I gave it a go in https://github.com/Shopify/sorbet/pull/870/changes but couldn't reduce the surface area. We need to keep track of multiple |
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
from
August 19, 2026 14:05
1352c0f to
5528b84
Compare
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
from
August 24, 2026 15:10
5528b84 to
1716ad5
Compare
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
2 times, most recently
from
August 28, 2026 15:15
e2c4436 to
216cafc
Compare
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
3 times, most recently
from
August 31, 2026 15:06
636d21d to
4e396b7
Compare
Given this RBS:
```ruby
#: Integer
attr_reader :foo, :bar
```
Before this fix, Spoom translated it to:
```ruby
sig { returns(Integer) }
attr_reader :foo, :bar
```
After this fix, Spoom translates it to:
```ruby
sig { returns(Integer) }
attr_reader :foo
sig { returns(Integer) }
attr_reader :bar
```
Given this RBS:
```ruby
#: Integer
attr_reader(
:foo,
:bar, # internal name
# keep this note
)
```
Spoom now translates it to:
```ruby
sig { returns(Integer) }
attr_reader(:foo)
sig { returns(Integer) }
attr_reader(:bar) # internal name
# keep this note
```
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
from
August 31, 2026 16:10
4e396b7 to
d722f87
Compare
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.
Rewrite
attr_reader,attr_writer, andattr_accessorcalls with multiple arguments so that each generated method has its own pending Sorbetsig.As a result of this PR
is translated into