Support RBS comment translation on multi-name attrs - #973
Open
KaanOzkan wants to merge 2 commits into
Open
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
7 times, most recently
from
September 2, 2026 14:00
d722f87 to
fb618db
Compare
KaanOzkan
marked this pull request as ready for review
September 2, 2026 15:01
soutaro
reviewed
Sep 3, 2026
soutaro
reviewed
Sep 3, 2026
soutaro
reviewed
Sep 3, 2026
soutaro
reviewed
Sep 3, 2026
soutaro
requested changes
Sep 3, 2026
Given this RBS:
```ruby
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
```
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
from
September 3, 2026 15:05
fb618db to
8b8a2d1
Compare
Given this RBS:
#: Integer
attr_reader(
:foo,
# keep this note
:bar, # internal name
)
Spoom now translates it to:
sig { returns(Integer) }
attr_reader(:foo)
# keep this note
sig { returns(Integer) }
attr_reader(:bar)
# internal name
KaanOzkan
force-pushed
the
ko-fix-rbs-comments-multi-attr
branch
from
September 3, 2026 15:26
8b8a2d1 to
f772bf8
Compare
soutaro
approved these changes
Sep 4, 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.
Will fix this issue after a Spoom bump in tapioca Shopify/tapioca#2662
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