Skip to content

Commit ffbfc4a

Browse files
authored
Remove sorbet-runtime dependency (#3556)
1 parent 5c371ed commit ffbfc4a

18 files changed

+14
-125
lines changed

.rubocop.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Sorbet/TrueSigil:
4949
- "test/**/*.rb"
5050
- "lib/ruby_indexer/test/**/*.rb"
5151
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
52-
- "lib/ruby_lsp/load_sorbet.rb"
5352
- "lib/ruby_lsp/scripts/compose_bundle.rb"
5453
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
5554
Exclude:
@@ -66,7 +65,6 @@ Sorbet/StrictSigil:
6665
- "lib/ruby_indexer/test/**/*.rb"
6766
- "lib/ruby-lsp.rb"
6867
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
69-
- "lib/ruby_lsp/load_sorbet.rb"
7068
- "lib/ruby_lsp/scripts/compose_bundle.rb"
7169
- "lib/ruby_lsp/test_helper.rb"
7270
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ group :development do
2222

2323
platforms :ruby do # C Ruby (MRI), Rubinius or TruffleRuby, but NOT Windows
2424
# sorbet-static is not available on Windows. We also skip Tapioca since it depends on sorbet-static-and-runtime
25-
gem "sorbet-static-and-runtime"
25+
gem "sorbet-static"
2626
gem "tapioca", "~> 0.16", require: false
2727
end
2828
end

Gemfile.lock

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ PATH
55
language_server-protocol (~> 3.17.0)
66
prism (>= 1.2, < 2.0)
77
rbs (>= 3, < 5)
8-
sorbet-runtime (>= 0.5.10782)
98

109
GEM
1110
remote: https://rubygems.org/
@@ -148,7 +147,7 @@ DEPENDENCIES
148147
rubocop-shopify (~> 2.16)
149148
rubocop-sorbet (~> 0.8)
150149
ruby-lsp!
151-
sorbet-static-and-runtime
150+
sorbet-static
152151
syntax_tree (>= 6.1.1, < 7)
153152
tapioca (~> 0.16)
154153
test-unit

exe/ruby-lsp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,8 @@ end
9090

9191
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
9292

93-
require "ruby_lsp/load_sorbet"
9493
require "ruby_lsp/internal"
9594

96-
T::Utils.run_all_sig_blocks
97-
9895
if options[:debug]
9996
if ["x64-mingw-ucrt", "x64-mingw32"].include?(RUBY_PLATFORM)
10097
$stderr.puts "Debugging is not supported on Windows"

exe/ruby-lsp-check

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@
33

44
# This executable checks if all automatic LSP requests run successfully on every Ruby file under the current directory
55

6-
require "ruby_lsp/load_sorbet"
7-
86
$LOAD_PATH.unshift(File.expand_path("../lib", __dir__))
97
require "ruby_lsp/internal"
108

11-
T::Utils.run_all_sig_blocks
12-
139
files = Dir.glob("#{Dir.pwd}/**/*.rb")
1410

1511
puts "Verifying that all automatic LSP requests execute successfully. This may take a while..."

exe/ruby-lsp-launcher

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,8 @@ end
125125
# Now that the bundle is set up, we can begin actually launching the server. Note that `Bundler.setup` will have already
126126
# configured the load path using the version of the Ruby LSP present in the composed bundle. Do not push any Ruby LSP
127127
# paths into the load path manually or we may end up requiring the wrong version of the gem
128-
require "ruby_lsp/load_sorbet"
129128
require "ruby_lsp/internal"
130129

131-
T::Utils.run_all_sig_blocks
132-
133130
if ARGV.include?("--debug")
134131
if ["x64-mingw-ucrt", "x64-mingw32"].include?(RUBY_PLATFORM)
135132
$stderr.puts "Debugging is not supported on Windows"

lib/rubocop/cop/ruby_lsp/use_language_server_aliases.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# frozen_string_literal: true
33

44
require "rubocop"
5-
require "sorbet-runtime"
65

76
module RuboCop
87
module Cop

lib/rubocop/cop/ruby_lsp/use_register_with_handler_method.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# frozen_string_literal: true
33

44
require "rubocop"
5-
require "sorbet-runtime"
65

76
module RuboCop
87
module Cop

lib/ruby_indexer/test/configuration_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_load_configuration_executes_configure_block
2020
assert(uris.none? { |uri| uri.full_path.include?("test/fixtures") })
2121
assert(uris.none? { |uri| uri.full_path.include?(bundle_path.join("minitest-reporters").to_s) })
2222
assert(uris.none? { |uri| uri.full_path.include?(bundle_path.join("ansi").to_s) })
23-
assert(uris.any? { |uri| uri.full_path.include?(bundle_path.join("sorbet-runtime").to_s) })
23+
assert(uris.any? { |uri| uri.full_path.include?(bundle_path.join("prism").to_s) })
2424
assert(uris.none? { |uri| uri.full_path == __FILE__ })
2525
end
2626

lib/ruby_lsp/document.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ module RubyLsp
55
# @abstract
66
#: [ParseResultType]
77
class Document
8-
extend T::Generic
9-
108
class InvalidLocationError < StandardError; end
9+
1110
# This maximum number of characters for providing expensive features, like semantic highlighting and diagnostics.
1211
# This is the same number used by the TypeScript extension in VS Code
1312
MAXIMUM_CHARACTERS_FOR_EXPENSIVE_FEATURES = 100_000
@@ -177,8 +176,6 @@ class Delete < Edit; end
177176
# See https://microsoft.github.io/language-server-protocol/specification/#positionEncodingKind for more information
178177
# @abstract
179178
class Scanner
180-
extend T::Sig
181-
182179
LINE_BREAK = 0x0A #: Integer
183180
# After character 0xFFFF, UTF-16 considers characters to have length 2 and we have to account for that
184181
SURROGATE_PAIR_START = 0xFFFF #: Integer

0 commit comments

Comments
 (0)