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

Concurrent appears to be causing issues. #552

Open
mckaysalisbury opened this issue May 15, 2024 · 4 comments
Open

Concurrent appears to be causing issues. #552

mckaysalisbury opened this issue May 15, 2024 · 4 comments

Comments

@mckaysalisbury
Copy link

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.

def self.physical_processor_count: () -> Integer

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?

@pocke
Copy link
Member

pocke commented May 16, 2024

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

@mckaysalisbury
Copy link
Author

mckaysalisbury commented May 16, 2024

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.

@pocke
Copy link
Member

pocke commented May 20, 2024

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.

@mckaysalisbury
Copy link
Author

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

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

2 participants