Skip to content

Commit e627c1d

Browse files
committed
Remove sorbet-runtime dependency
1 parent af30123 commit e627c1d

18 files changed

+13
-125
lines changed

.rubocop.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ Sorbet/TrueSigil:
4747
- "test/**/*.rb"
4848
- "lib/ruby_indexer/test/**/*.rb"
4949
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
50-
- "lib/ruby_lsp/load_sorbet.rb"
5150
- "lib/ruby_lsp/scripts/compose_bundle.rb"
5251
- "lib/ruby_lsp/test_reporters/test_unit_reporter.rb"
5352
Exclude:
@@ -64,7 +63,6 @@ Sorbet/StrictSigil:
6463
- "lib/ruby_indexer/test/**/*.rb"
6564
- "lib/ruby-lsp.rb"
6665
- "lib/ruby_indexer/lib/ruby_indexer/prefix_tree.rb"
67-
- "lib/ruby_lsp/load_sorbet.rb"
6866
- "lib/ruby_lsp/scripts/compose_bundle.rb"
6967
- "lib/ruby_lsp/test_helper.rb"
7068
- "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/
@@ -145,7 +144,7 @@ DEPENDENCIES
145144
rubocop-shopify (~> 2.15)
146145
rubocop-sorbet (~> 0.8)
147146
ruby-lsp!
148-
sorbet-static-and-runtime
147+
sorbet-static
149148
syntax_tree (>= 6.1.1, < 7)
150149
tapioca (~> 0.16)
151150
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: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ module RubyLsp
55
# @abstract
66
#: [ParseResultType]
77
class Document
8-
extend T::Generic
9-
108
# This maximum number of characters for providing expensive features, like semantic highlighting and diagnostics.
119
# This is the same number used by the TypeScript extension in VS Code
1210
MAXIMUM_CHARACTERS_FOR_EXPENSIVE_FEATURES = 100_000
@@ -164,8 +162,6 @@ class Replace < Edit; end
164162
class Delete < Edit; end
165163

166164
class Scanner
167-
extend T::Sig
168-
169165
LINE_BREAK = 0x0A #: Integer
170166
# After character 0xFFFF, UTF-16 considers characters to have length 2 and we have to account for that
171167
SURROGATE_PAIR_START = 0xFFFF #: Integer

0 commit comments

Comments
 (0)