Skip to content

How to skip constants with tapioca gem GEM? #2183

Closed as not planned
Closed as not planned
@ivy

Description

@ivy

Hi! 👋 I ran into a problem where I wanted to run tapioca gem activesupport but I was getting errors from Sorbet because ActiveSupport::TestCase extends from Minitest which is not a dependency in my project. I didn't want to add it so I worked around it by making a hack with the following:

# sorbet/tapioca/require.rb
require 'active_support'
ActiveSupport.const_set(:TestCase, nil)

This feels icky and I'd have preferred to have something like:

# sorbet/tapioca/config.yml

gem:
  skip_constant:
    - "ActiveSupport::TestCase"

That doesn't appear to be an option though! Am I misunderstanding how tapioca dsl is intended to be used? Please me know if I missed something in the docs! Thanks a bunch! 😅

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