Skip to content

Tapioca doesn't import hand written signatures from the stripe gem #2248

@ms-jpq

Description

@ms-jpq

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:

see https://github.com/stripe/stripe-ruby/blob/5ce725ae222219a0ebc3d8f1140644e25fc9f740/rbi/stripe/resources/v2/event.rbi#L9


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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    help-wantedWe support this change, and welcome community contributions for it.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions