ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

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

Open Earlopain opened this issue 1 year ago • 7 comments

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.

Earlopain avatar Apr 16 '24 11:04 Earlopain

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 avatar Apr 17 '24 14:04 andyw8

Discussed with the team today:

  • We will decide on what is considered an 'old' server version, perhaps v0.12 where Prism was introduced. Over time, we may bump this to a more recent version.
  • When we detect an old server version, we'll show a warning in the extension. This will link to the troubleshooting guide, in a new section explaining possible causes of the server gem being outdated (e.g. the YARP/Prism issue). There will be an option to snooze/ignore the warning.
  • In the EDITORS.md doc we'll also explain the potential problem, for the benefit of those not using VS Code.

andyw8 avatar Apr 22 '24 18:04 andyw8

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")

stathis-alexander avatar May 16 '24 15:05 stathis-alexander

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

andyw8 avatar May 29 '24 19:05 andyw8

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

Earlopain avatar Jun 10 '24 20:06 Earlopain

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

This should be the last time we run into this.

andyw8 avatar Jun 11 '24 13:06 andyw8

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

andyw8 avatar Jun 11 '24 18:06 andyw8

This issue is being marked as stale because there was no activity in the last 2 months

github-actions[bot] avatar Aug 11 '24 12:08 github-actions[bot]