Shopify / Shopify/tapioca

`tapioca gem`: `attr_*` with several names + RBS-comment: not all result methods have sigs

Open Beginner friendly
#2,662 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Ruby
Stars
873
Forks
164
Avg merge
4d 27m
Merged PRs (30d)
9

Description

The following code

class Foo
  #: Integer
  attr_reader :bar, :baz, :foo
end

is compiled to

class Foo
  sig { returns(::Integer) }
  def bar; end

  def baz; end
  def foo; end
end

In the result, only the first method has a sig, the rest don't. It is expected all the methods to have sigs.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the provided Ruby class and inspect the tapioca gem handling for attr_reader declarations with several names and an RBS comment. Add a regression test showing that every generated method receives the Integer sig, then verify the generated RBI matches the expected result.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.