Shopify / ruby-lsp

An opinionated language server for Ruby
https://shopify.github.io/ruby-lsp/
MIT License
1.4k stars 128 forks source link

Warn/Refuse to install if `ruby-lsp` resolves to old versions #1945

Open Earlopain opened 2 months ago

Earlopain commented 2 months ago

Description

rubocop currently has a dev dependency on the latest prism version >= 0.25 which this gem doesn't advertise support for at the moment.

During resolution, this results in a ruby-lsp version without prism as a dependency to be choosen, 0.11.2 from october last year. It seems to mostly work but obviously a bunch of stuff is missing.

andyw8 commented 2 months ago

There should be a new release of Prism today, which will unblock this: ~https://github.com/Shopify/ruby-lsp/pull/1913~ https://github.com/Shopify/ruby-lsp/pull/1953

andyw8 commented 2 months ago

Discussed with the team today:

stathis-alexander commented 1 month ago

This is still occurring. Prism is resolving to 0.29, but ruby-lsp resolves to v11.2 because v16.6 requires prism <0.28. This is a pretty significant regression.

Can we maybe consider using pessimistic dependencies here so that new versions don't downgrade us?

s.add_dependency("prism", "~>0.23")
andyw8 commented 1 month ago

@kddnewton confirmed the next release of Prism will be 1.0, so this will become less of a problem soon.

Earlopain commented 4 weeks ago

Noting that I ran into this again today while working on RuboCop since it aggressively keeps up with prism updates.

andyw8 commented 3 weeks ago

We've updated for Prism v0.30.0, and will release shortly.

This should be the last time we run into this.

andyw8 commented 3 weeks ago

Released: https://rubygems.org/gems/ruby-lsp/versions/0.17.3