castwide/solargraph

Dependency on rbs2 prevents working on platforms with ruby3 and rbs3

rubin55 opened this issue · 2 comments

Like the title; AUR package is stuck on Arch Linux due to solargraph depending on rbs 2.x instead of 3:

$ solargraph
/usr/lib/ruby/3.0.0/rubygems/specification.rb:1453:in `rescue in block in activate_dependencies': Could not find 'rbs' (~> 2.0) among 110 total gem(s) (Gem::MissingSpecError)
Checked in 'GEM_PATH=/home/rubin/.local/share/gem/ruby/3.0.0:/usr/lib/ruby/gems/3.0.0' at: /usr/lib/ruby/gems/3.0.0/specifications/solargraph-0.50.0.gemspec, execute `gem env` for more information
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1450:in `block in activate_dependencies'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `each'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `activate_dependencies'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1421:in `activate'
	from /usr/lib/ruby/3.0.0/rubygems.rb:286:in `block in activate_bin_path'
	from /usr/lib/ruby/3.0.0/rubygems.rb:285:in `synchronize'
	from /usr/lib/ruby/3.0.0/rubygems.rb:285:in `activate_bin_path'
	from /usr/bin/solargraph:25:in `<main>'
/usr/lib/ruby/3.0.0/rubygems/dependency.rb:313:in `to_specs': Could not find 'rbs' (~> 2.0) - did find: [rbs-3.1.0] (Gem::MissingSpecVersionError)
Checked in 'GEM_PATH=/home/rubin/.local/share/gem/ruby/3.0.0:/usr/lib/ruby/gems/3.0.0' , execute `gem env` for more information
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1451:in `block in activate_dependencies'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `each'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1439:in `activate_dependencies'
	from /usr/lib/ruby/3.0.0/rubygems/specification.rb:1421:in `activate'
	from /usr/lib/ruby/3.0.0/rubygems.rb:286:in `block in activate_bin_path'
	from /usr/lib/ruby/3.0.0/rubygems.rb:285:in `synchronize'
	from /usr/lib/ruby/3.0.0/rubygems.rb:285:in `activate_bin_path'
	from /usr/bin/solargraph:25:in `<main>'

Link to AUR package mentioning this issue: https://aur.archlinux.org/packages/ruby-solargraph

What needs to be done to support RBS 3.x?

@rubin55 I presume you've tried installing rbs directly on the CLI?
I had this issue, I uninstalled all rbs versions on my system (gem uninstall rbs).
And directly installed rbs 2.8.4 along with the solargraph gem and it's running fine on Ruby 3.1.2.

@raldred I can't use rbs 2.8 because I am using ruby 3.3 but even if ruby 3.3 is not the reason, I am also using steep 1.6, and steep requires rbs 3.x and its conflict with solargraph version.

because I started my project with ruby 3.3 and steep 1.6, now I can't downgrade as well, as I've tried to install steep 1.4 and then steep fails to run.