From 108bba4a21916472527d4ebd0d973b45c71169d2 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 16 May 2024 14:37:59 -0400 Subject: [PATCH 01/10] Add outdated version info to troubleshooting guide [skip ci] --- TROUBLESHOOTING.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index fc2c9700d..39b9762d5 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -202,6 +202,36 @@ ruby-lsp Is there any extra information given from booting the server manually? Or does it only fail when booting through the extension? +### Outdated Version + +In some circumstances, the version of Ruby LSP activated may be very outdated. + +**Why This Happens** + +Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. +Prior to that, it had a dependency on a different parser, [YARP](https://rubygems.org/gems/yarp). +Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. +For that reason, we constrain the version of Prism up to that which is known to be compatible. + +With the custom bundle approach describe earlier, Bundler resolves a version of Ruby LSP which is compatible the dependencies already in your `Gemfile.lock.` + +When a new version of Prism is released, it will take a little time for us as Ruby LSP maintainers to verify the compatibility, and make any necessary updates. + +During that time, it's possible for the Prism version in your `Gemfile.lock` to be increased due to being a dependency of another gem in your bundle. + +If the Prism constraint cannot be satisfied, Bundler may resolve `ruby-lsp` to a much older version, which uses YARP. + +**How To Solve It** + +You can add a dependency constraint to your Gemfile limiting the Prism version to that maximum supported by Ruby LSP. +For example: + +``` +gem "prism", "< 0.28" # example for Ruby LSP v0.16.6 +``` + +Once Prism becomes sufficiently stable, we will relax the version constraint to alleviate this problem. + ## After troubleshooting If after troubleshooting the Ruby LSP is still not initializing properly, please report an issue From cd25abc031935f52a52e0ad1ccccb91478629f4a Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 16 May 2024 14:40:57 -0400 Subject: [PATCH 02/10] Update TROUBLESHOOTING.md Co-authored-by: Dirceu Pereira Tiegs --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 39b9762d5..6a6e174b6 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -206,7 +206,7 @@ extension? In some circumstances, the version of Ruby LSP activated may be very outdated. -**Why This Happens** +**Why this happens** Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. Prior to that, it had a dependency on a different parser, [YARP](https://rubygems.org/gems/yarp). From 2741165706bbb11633ba8491d6bf5b3e963633e4 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Thu, 16 May 2024 14:41:04 -0400 Subject: [PATCH 03/10] Update TROUBLESHOOTING.md Co-authored-by: Dirceu Pereira Tiegs --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 6a6e174b6..aa1d2afae 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -221,7 +221,7 @@ During that time, it's possible for the Prism version in your `Gemfile.lock` to If the Prism constraint cannot be satisfied, Bundler may resolve `ruby-lsp` to a much older version, which uses YARP. -**How To Solve It** +**How to solve it** You can add a dependency constraint to your Gemfile limiting the Prism version to that maximum supported by Ruby LSP. For example: From 4ad956328aa95648f8591b1b57f7216fb8539f66 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 21 May 2024 14:05:18 -0400 Subject: [PATCH 04/10] Update TROUBLESHOOTING.md --- TROUBLESHOOTING.md | 62 +++++++++++++++++++++++----------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index aa1d2afae..8d7baf0f0 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -36,7 +36,37 @@ to index for features such as go to definition. ## Common issues -There are two main sources of issues users typically face during activation: shell or Bundler related problems. +There are three main sources of issues users typically face during activation: outdated version activation, shell problems, or Bundler related problems. + +### Outdated Version Activation + +In some circumstances, the version of Ruby LSP activated may be very outdated. + +**Why this happens** + +Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. +Prior to that, it had a dependency on a different parser, [YARP](https://rubygems.org/gems/yarp). +Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. +For that reason, we constrain the version of Prism up to that which is known to be compatible. + +With the custom bundle approach describe earlier, Bundler resolves a version of Ruby LSP which is compatible the dependencies already in your `Gemfile.lock.` + +When a new version of Prism is released, it will take a little time for us as Ruby LSP maintainers to verify the compatibility, and make any necessary updates. + +During that time, it's possible for the Prism version in your `Gemfile.lock` to be increased due to being a dependency of another gem in your bundle. + +If the Prism constraint cannot be satisfied, Bundler may resolve `ruby-lsp` to a much older version, which uses YARP. + +**How to solve it** + +You can add a dependency constraint to your Gemfile limiting the Prism version to that maximum supported by Ruby LSP. +For example: + +``` +gem "prism", "< 0.28" # example for Ruby LSP v0.16.6 +``` + +Once Prism becomes sufficiently stable, we will relax the version constraint to alleviate this problem. ### Shell issues @@ -202,36 +232,6 @@ ruby-lsp Is there any extra information given from booting the server manually? Or does it only fail when booting through the extension? -### Outdated Version - -In some circumstances, the version of Ruby LSP activated may be very outdated. - -**Why this happens** - -Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. -Prior to that, it had a dependency on a different parser, [YARP](https://rubygems.org/gems/yarp). -Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. -For that reason, we constrain the version of Prism up to that which is known to be compatible. - -With the custom bundle approach describe earlier, Bundler resolves a version of Ruby LSP which is compatible the dependencies already in your `Gemfile.lock.` - -When a new version of Prism is released, it will take a little time for us as Ruby LSP maintainers to verify the compatibility, and make any necessary updates. - -During that time, it's possible for the Prism version in your `Gemfile.lock` to be increased due to being a dependency of another gem in your bundle. - -If the Prism constraint cannot be satisfied, Bundler may resolve `ruby-lsp` to a much older version, which uses YARP. - -**How to solve it** - -You can add a dependency constraint to your Gemfile limiting the Prism version to that maximum supported by Ruby LSP. -For example: - -``` -gem "prism", "< 0.28" # example for Ruby LSP v0.16.6 -``` - -Once Prism becomes sufficiently stable, we will relax the version constraint to alleviate this problem. - ## After troubleshooting If after troubleshooting the Ruby LSP is still not initializing properly, please report an issue From 6b3dbd113886b2a3a333753fc055725d9ea361f9 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 21 May 2024 14:09:10 -0400 Subject: [PATCH 05/10] Update TROUBLESHOOTING.md --- TROUBLESHOOTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 8d7baf0f0..d96469b99 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -36,9 +36,9 @@ to index for features such as go to definition. ## Common issues -There are three main sources of issues users typically face during activation: outdated version activation, shell problems, or Bundler related problems. +There are three main sources of issues users typically face during activation: outdated version, shell problems, or Bundler related problems. -### Outdated Version Activation +### Outdated Version In some circumstances, the version of Ruby LSP activated may be very outdated. From 3cdf07532014dd8c9364cc8cf8703da3bb839e3c Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 28 May 2024 11:27:09 -0400 Subject: [PATCH 06/10] Update TROUBLESHOOTING.md Co-authored-by: Vinicius Stock --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index d96469b99..f756f5a81 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -45,7 +45,7 @@ In some circumstances, the version of Ruby LSP activated may be very outdated. **Why this happens** Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. -Prior to that, it had a dependency on a different parser, [YARP](https://rubygems.org/gems/yarp). +Prior to that, the Prism parser was named [YARP](https://rubygems.org/gems/yarp). The fact that the gem was renamed leads to some awkward dependency resolutions. Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. For that reason, we constrain the version of Prism up to that which is known to be compatible. From 1754aa66ba6e24e33fa78421c1ca9d1b9db06e1c Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 28 May 2024 11:27:43 -0400 Subject: [PATCH 07/10] Update TROUBLESHOOTING.md Co-authored-by: Vinicius Stock --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index f756f5a81..fd122bf0f 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -55,7 +55,7 @@ When a new version of Prism is released, it will take a little time for us as Ru During that time, it's possible for the Prism version in your `Gemfile.lock` to be increased due to being a dependency of another gem in your bundle. -If the Prism constraint cannot be satisfied, Bundler may resolve `ruby-lsp` to a much older version, which uses YARP. +If Prism is locked to a newer version not yet supported by the Ruby LSP, then the only outcome that satisfies Bundler checks is to install the very old versions that depended on the old name YARP. **How to solve it** From 024047413d4176b792502f866240679d5d464720 Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:55:19 -0400 Subject: [PATCH 08/10] Update to mention RBS --- TROUBLESHOOTING.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index fd122bf0f..33ebcba7d 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -40,9 +40,9 @@ There are three main sources of issues users typically face during activation: o ### Outdated Version -In some circumstances, the version of Ruby LSP activated may be very outdated. +In some circumstances, the version of Ruby LSP activated may be very outdated. There are two common reasons for this: -**Why this happens** +**Prism constraints** Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. Prior to that, the Prism parser was named [YARP](https://rubygems.org/gems/yarp). The fact that the gem was renamed leads to some awkward dependency resolutions. @@ -68,6 +68,11 @@ gem "prism", "< 0.28" # example for Ruby LSP v0.16.6 Once Prism becomes sufficiently stable, we will relax the version constraint to alleviate this problem. +** RBS constrains ** + +Ruby LSP has a dependency on RBS v3. If another gem constrains the version of RBS to an older release, it will not be possible to use newer +versions of Ruby LSP. + ### Shell issues When the extension invokes the shell and loads its config file (`~/.zshrc`, `~/.bashrc`, etc), it is susceptible to From d608c8ab6542f6e92400e65d77b8ec0fced91e99 Mon Sep 17 00:00:00 2001 From: Andy Waite <13400+andyw8@users.noreply.github.com> Date: Fri, 12 Jul 2024 15:58:06 -0400 Subject: [PATCH 09/10] Update version example --- TROUBLESHOOTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 33ebcba7d..78b823a33 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -45,7 +45,7 @@ In some circumstances, the version of Ruby LSP activated may be very outdated. T **Prism constraints** Since v0.12.0, Ruby LSP has had a dependency on the [Prism](https://rubygems.org/gems/prism) parser. -Prior to that, the Prism parser was named [YARP](https://rubygems.org/gems/yarp). The fact that the gem was renamed leads to some awkward dependency resolutions. +Prior to that, the Prism parser was named [YARP](https://rubygems.org/gems/yarp). The fact that the gem was renamed leads to some awkward dependency resolutions issues. Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. For that reason, we constrain the version of Prism up to that which is known to be compatible. @@ -63,7 +63,7 @@ You can add a dependency constraint to your Gemfile limiting the Prism version t For example: ``` -gem "prism", "< 0.28" # example for Ruby LSP v0.16.6 +gem "prism", "< 0.31" # example for Ruby LSP v0.17.7 ``` Once Prism becomes sufficiently stable, we will relax the version constraint to alleviate this problem. From 766ed446cac8c604087e42aeb99194d90fc1d72d Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Tue, 16 Jul 2024 15:21:45 -0400 Subject: [PATCH 10/10] Update TROUBLESHOOTING.md Co-authored-by: Vinicius Stock --- TROUBLESHOOTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 78b823a33..7f31db647 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -49,7 +49,7 @@ Prior to that, the Prism parser was named [YARP](https://rubygems.org/gems/yarp) Since Prism is a pre-1.0 release, there may be breaking changes introduced in minor versions. For that reason, we constrain the version of Prism up to that which is known to be compatible. -With the custom bundle approach describe earlier, Bundler resolves a version of Ruby LSP which is compatible the dependencies already in your `Gemfile.lock.` +With the custom bundle approach described earlier, Bundler resolves a version of Ruby LSP which is compatible the dependencies already in your `Gemfile.lock.` When a new version of Prism is released, it will take a little time for us as Ruby LSP maintainers to verify the compatibility, and make any necessary updates.