How to deal with gems with integrations
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.