Skip to content

Tapioca doesn’t generate the expected types from rbi/stripe/* #1577

@Tom-Bonnike

Description

@Tom-Bonnike

Describe the bug

👋 As you know, the stripe-ruby gem ships .rbi files since v14; however when generating the RBI files via Tapioca, it doesn’t generate any signature except for params of each class’ def initialize… and, interestingly, the attributes of the Stripe::V2::Amount class?

For example, if you look at the PaymentIntent RBI, each attribute is properly typed, yet it’s not picked up by Tapioca. Any clue? Is it a problem with how the .rbi files are defined, or do you think it’s a bug in Tapioca?

From your README:

and to decrease Tapioca loading time we pack the gem with the combined RBI at rbi/stripe.rbi.

I can’t find this file? it’s only on the beta branch

While I’m at it, it’s super slow to re-generate the rbi for the gem… do you think it could be because of Shopify/tapioca#1361 / Shopify/tapioca#1285? I wonder if shipping the docs in the rbi files is useful; they’re already included in the actual gem, so they should be raised up in the editor when hovering anyway, no? I can create a separate issue for that if you think it’s worth it.

To Reproduce

  1. Install the Stripe gem (v14 or v15 leads to the same issue)
  2. Run bin/tapioca gem stripe to generate the RBI for the Stripe gem
  3. Open the generated sorbet/rbi/gems/stripe@15.0.0.rbi; signatures are missing except for initialize methods.

Expected behavior

The full signatures should be generated by Sorbet.

Code snippets

OS

macOS

Language version

Ruby 3.3.7

Library version

stripe-ruby v15

API version

N/A

Additional context

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions