Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to deal with gems with integrations #1728

Open
HoneyryderChuck opened this issue Jan 19, 2024 · 0 comments
Open

How to deal with gems with integrations #1728

HoneyryderChuck opened this issue Jan 19, 2024 · 0 comments

Comments

@HoneyryderChuck
Copy link
Contributor

I'm adding gem_rbs_collection to this library integrating with datadog. All is well, until I run steep check, and I get error messages coming from datadog's signatures:

# example
../../.gem/ruby/3.2.2/gems/datadog-ci-0.6.0/sig/datadog/ci/contrib/rspec/example.rbs:8:12: [error] Cannot find type `::RSpec::Core::Example`
│ Diagnostic ID: RBS::UnknownTypeName
│
└             include ::RSpec::Core::Example
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

../../.gem/ruby/3.2.2/gems/datadog-ci-0.6.0/sig/datadog/ci/contrib/rspec/example_group.rbs:9:12: [error] Cannot find type `::RSpec::Core::ExampleGroup::ClassMethods`
│ Diagnostic ID: RBS::UnknownTypeName
│
└             include ::RSpec::Core::ExampleGroup::ClassMethods
              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The odd thing here being, I'm not using, nor loading rspec (and same for similar error I see).

The problem seems to be that datadog ships with integrations, which patch other known gems to include its tracing API. Therefore, signatures to those patch modules will include references for the things they're patching (rspec, sidekiq, even rails...), which they can deal with in their own env/CI, but I shouldn't have to, as I'm not using rspec, sidekiq or rais.

Seems that rbs needs to find a way to gracefully ignore signatures for entities which do not exist in a given environment. Either that, or I have to be able to ignore errors such as the one above, as they're not referring by the check call in the Steepfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant