You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ solargraph scan
/home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment_loader.rb:138:in 'block in RBS::EnvironmentLoader#each_dir': Cannot find type definitions for library: stringio ([nil]) (RBS::EnvironmentLoader::UnknownLibraryError)
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/set.rb:504:in 'Hash#each_key'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/set.rb:504:in 'Set#each'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment_loader.rb:136:in 'RBS::EnvironmentLoader#each_dir'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment_loader.rb:157:in 'RBS::EnvironmentLoader#each_signature'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment_loader.rb:121:in 'RBS::EnvironmentLoader#load'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment.rb:172:in 'block in RBS::Environment.from_loader'
from <internal:kernel>:91:in 'Kernel#tap'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/rbs-3.8.1/lib/rbs/environment.rb:171:in 'RBS::Environment.from_loader'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/rbs_map/core_map.rb:16:in 'Solargraph::RbsMap::CoreMap#initialize'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/api_map.rb:24:in 'Class#new'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/api_map.rb:24:in '<class:ApiMap>'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/api_map.rb:13:in '<module:Solargraph>'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/api_map.rb:9:in '<top (required)>'
from <internal:/home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from <internal:/home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/3.4.0/rubygems/core_ext/kernel_require.rb>:136:in 'Kernel#require'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/shell.rb:180:in 'block in Solargraph::Shell#scan'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/benchmark-0.4.0/lib/benchmark.rb:304:in 'Benchmark.measure'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/lib/solargraph/shell.rb:179:in 'Solargraph::Shell#scan'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/command.rb:28:in 'Thor::Command#run'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/invocation.rb:127:in 'Thor::Invocation#invoke_command'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor.rb:538:in 'Thor.dispatch'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/thor-1.3.2/lib/thor/base.rb:584:in 'Thor::Base::ClassMethods#start'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/lib/ruby/gems/3.4.0/gems/solargraph-0.50.1/bin/solargraph:5:in '<top (required)>'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/bin/solargraph:25:in 'Kernel#load'
from /home/MYUSER/.local/share/mise/installs/ruby/3.4.1/bin/solargraph:25:in '<main>
The text was updated successfully, but these errors were encountered:
I made a small investigation. It looks like this is because of change in rbs 3.6.0.
I cloned the repository and forced rbs version 3.5.3 - solagraph works (there are some warnings though). It can be a workaround for people that need this asap.
When I leave rbs in '~> 3.0', I have to remove (no_stdlib: true) from rbs_map/core_map.rb#15. The error about stringio is missing but there is a problem with a new type UntypedFunction that was added in ruby/rbs#1806. There are errors about type.type.required_positionals, type.type.optional_positionals etc. Looks like ruby-lsp had a similar problem: Shopify/ruby-lsp#2631
I'm currently working on a fix along the same lines of what @pjezusek caught. I'll push it as a PR in case anyone wants to check it out before I merge.
branch: master@d9a0a89308a3337e2ae4d343a46b96e859b99245
ruby version: 3.4.1
stacktrace:
The text was updated successfully, but these errors were encountered: