gem_rbs_collection icon indicating copy to clipboard operation
gem_rbs_collection copied to clipboard

Concurrent appears to be causing issues.

Open mckaysalisbury opened this issue 1 year ago • 4 comments

I have included a bunch of gems from this repo in my collection. Specifically, I need Concurrent::Map from the concurrent-ruby gem.

However, when including this gem steep reports an error for both signatures in this file.

https://github.com/ruby/gem_rbs_collection/blob/7a105f52053ce1c708b605dfa9c1ab8473424036/gems/concurrent-ruby/1.1/utility/processor_counter.rbs#L2

Non-overloading method definition of `physical_processor_count` in ``::Concurrent`` cannot be duplicated
  Diagnostic ID: RBS::DuplicateMethodDefinition

When I comment out the two method signatures in that line, everything is fine.

Is there a better workaround?

mckaysalisbury avatar May 15 '24 23:05 mckaysalisbury

Do you specify the require: false option to the steep gem in the Gemfile?

This definition is probably duplicated in concurrent-ruby and steep. You can avoid this problem by skipping loading steep gem's RBS.

https://github.com/soutaro/steep/blob/a868762c2bd09f0954b05cdd9eab1819e14a51d3/sig/shims/concurrent-ruby.rbs#L19

pocke avatar May 16 '24 05:05 pocke

I have tried skipping that particular gem, but other .rbs files in the collection for the gem are required and unduplicated, so that didn't work.

mckaysalisbury avatar May 16 '24 15:05 mckaysalisbury

Thanks for your try. I have no idea of the cause for now...

Could you give me a (minimum) reproduction code? Gemfile, Gemfile.lock, rbs_collection.yaml, and rbs_collection.lock.yaml are necessary to reproduce a problem related to rbs collection.

pocke avatar May 20 '24 06:05 pocke

Hmm, I'm not sure how much I'm at liberty to share. I'll try to create a repro.

mckaysalisbury avatar May 22 '24 20:05 mckaysalisbury