How to deal with gems with integrations
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
Research direction
Reproduce the report from the Steepfile by running steep check with gem_rbs_collection and the Datadog signatures. Trace how integration signatures referencing unused RSpec, Sidekiq, or Rails entities are loaded and diagnosed. Done should establish and test a supported behavior for these unused integrations or a documented way to suppress the reported errors.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Ruby
- Stars
- 2.2k
- Forks
- 263
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 64
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ruby/rbs
-
InlineParser: `@rbs @ivar` annotation is reported as unused unless it is the first thing in the class bodyPossibly taken @ksss claimed this 50 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 1 day
Similar issues
-
needs verification
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 13 days
-
🐛 bug 👩💻 équipe CE 🧑🏭 entreprises
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
betagouv/conseillers-entreprises#4808 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
yosiat/panko_serializer#250 ·