Tapioca doesn't import hand written signatures from the `stripe` gem
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Description
hola 👋,
Stripe just released their v14 of their SDK, and it ships with generated RBI definitions https://github.com/stripe/stripe-ruby/tree/master/rbi/stripe
But there is a problem:
when you run bundle exec tapioca gem stripe, you get the following output
# source://stripe//lib/stripe/resources/v2/event.rb#13
class Stripe::V2::Event::Reason < ::Stripe::StripeObject
# source://stripe//lib/stripe/resources/v2/event.rb#23
def request; end
# source://stripe//lib/stripe/resources/v2/event.rb#21
def type; end
end
which contains no type definition for either request or type, when the original RBI file does include them:
As a library author, how I got around this limitation is that I inserted a snippet at the beginning of my gem, such that when "required" under tapioca, it bails out of the introspection.
see https://github.com/orbcorp/orb-ruby/blob/d109a878d3a85e263521dab7ae604eaf63b81f54/lib/orb.rb#L21
Is there a less hacky way to work around this particular issue?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the generated output for stripe with the handwritten signatures in rbi/stripe/resources/v2/event.rbi, focusing on request and type. Read the workaround in orb.rb to understand how it avoids introspection, then identify the expected import behavior and verify that the generated RBI preserves those signatures.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100