Skip to content

Commit

Permalink
Bump Prism to 0.24 (#1385)
Browse files Browse the repository at this point in the history
* Bump Prism to 0.24

* Update def_rescue fixture for newer Prism

Currently, the rescue folding range in the `def_rescue` test is actually
generated through the "pseudo" begin node's location, not the rescue node's.
This is because the rescue node's statement is empty, so we skip its range
in the folding range generation. Due to this, we actually are not testing
the folding range of the rescue node, but the "pseudo" begin block node's.

But after Prism 0.22, the "pseudo" begin block node's start position now
matches the def node's, so the test now fails.

So this commit updates the `def_rescue` fixture to actually test the
folding range of the rescue node, not the "pseudo" begin block node.
  • Loading branch information
st0012 authored Feb 16, 2024
1 parent feb2f8a commit 20c5b61
Show file tree
Hide file tree
Showing 6 changed files with 6,931 additions and 7,474 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ PATH
specs:
ruby-lsp (0.14.0)
language_server-protocol (~> 3.17.0)
prism (>= 0.19.0, < 0.22)
prism (>= 0.22.0, < 0.25)
sorbet-runtime (>= 0.5.10782)

GEM
Expand Down Expand Up @@ -44,14 +44,14 @@ GEM
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
prism (0.21.0)
prism (0.24.0)
psych (5.1.2)
stringio
racc (1.7.3)
rainbow (3.1.1)
rake (13.1.0)
rbi (0.1.8)
prism (>= 0.18.0, < 0.22)
rbi (0.1.9)
prism (>= 0.18.0, < 0.25)
sorbet-runtime (>= 0.5.9204)
regexp_parser (2.9.0)
reline (0.4.1)
Expand Down
2 changes: 1 addition & 1 deletion ruby-lsp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_dependency("language_server-protocol", "~> 3.17.0")
s.add_dependency("prism", ">= 0.19.0", "< 0.22")
s.add_dependency("prism", ">= 0.22.0", "< 0.25")
s.add_dependency("sorbet-runtime", ">= 0.5.10782")

s.required_ruby_version = ">= 3.0"
Expand Down
Loading

0 comments on commit 20c5b61

Please sign in to comment.