ruby / rbs

Type Signature for Ruby
Other
1.94k stars 212 forks source link

Cannot find module with rbs collection install #1309

Open kinton opened 1 year ago

kinton commented 1 year ago

Hello! I have "Cannot find '::Net'" error after performing rbs collection install. When I perform git submodule add https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection ::Net module remains available. This may be related with https://github.com/ruby/rbs/issues/853 issue

pocke commented 1 year ago

Could you describe how to reproduce? It will be helpful if you can create a minimal reproduction file set and the command causing the error. Or could you share the RBS-related files' contents? (Gemfile, Gemfile.lock, rbs_collection.yaml, rbs_collection.lock.yaml, and the RBS file having the error).

kinton commented 1 year ago

@pocke Thank you for your reply! I'm sorry, probably the problem is not with rbs itself, but with jetbrains ide, since the error occurs in rubymine after installing with rbs collection install. Using git submodule add ..., rubymine sees all the classes without any problem. So I think the issue should be closed.

But still, just in case, I will provide a Gemfile, rbs_collection.yaml and the signature file. Ruby version is 2.7.2

After rbs collection install: image

After rm rbs_collection.lock.yaml or git submodule add https://github.com/ruby/gem_rbs_collection.git vendor/rbs/gem_rbs_collection: image

Gemfile.lock.txt Gemfile.txt rbs_collection.lock.yaml.txt rbs_collection.yaml.txt redirector.rbs.txt