ruby-lsp 0.14.1 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/exe/ruby-lsp-doctor +2 -0
- data/lib/ruby_lsp/addon.rb +13 -7
- data/lib/ruby_lsp/internal.rb +7 -5
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 293c03761c9b7d497045546e3bf7ca88a08ed5556ad0ba52c205a9798e820ce5
|
4
|
+
data.tar.gz: 38157f012f3f1dc944186ac1530dc660d8662cb59ca7b12ad3b117655e0c1709
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4996e277088f015004df0f82e2cc47dc2f979f6658f9dfac19fe495c8c4deced3028b021e330ac0681dbfd79048e9033037c7ce93e6cc044c8ae6d91087e0df
|
7
|
+
data.tar.gz: 67c5c31c97c279f192b0b3d6c729c97a19f7aac4581eca037c0e5355cc0f3d3ed69fb4007a5f32985e046980324575e2e35a92ce81e8078b41ee5b6db711ac88
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.14.
|
1
|
+
0.14.2
|
data/exe/ruby-lsp-doctor
CHANGED
data/lib/ruby_lsp/addon.rb
CHANGED
@@ -25,21 +25,25 @@ module RubyLsp
|
|
25
25
|
|
26
26
|
abstract!
|
27
27
|
|
28
|
+
@addons = T.let([], T::Array[Addon])
|
29
|
+
@addon_classes = T.let([], T::Array[T.class_of(Addon)])
|
30
|
+
|
28
31
|
class << self
|
29
32
|
extend T::Sig
|
30
33
|
|
34
|
+
sig { returns(T::Array[Addon]) }
|
35
|
+
attr_accessor :addons
|
36
|
+
|
37
|
+
sig { returns(T::Array[T.class_of(Addon)]) }
|
38
|
+
attr_reader :addon_classes
|
39
|
+
|
31
40
|
# Automatically track and instantiate addon classes
|
32
41
|
sig { params(child_class: T.class_of(Addon)).void }
|
33
42
|
def inherited(child_class)
|
34
|
-
|
43
|
+
addon_classes << child_class
|
35
44
|
super
|
36
45
|
end
|
37
46
|
|
38
|
-
sig { returns(T::Array[Addon]) }
|
39
|
-
def addons
|
40
|
-
@addons ||= T.let([], T.nilable(T::Array[Addon]))
|
41
|
-
end
|
42
|
-
|
43
47
|
# Discovers and loads all addons. Returns the list of activated addons
|
44
48
|
sig { params(message_queue: Thread::Queue).returns(T::Array[Addon]) }
|
45
49
|
def load_addons(message_queue)
|
@@ -51,11 +55,13 @@ module RubyLsp
|
|
51
55
|
$stderr.puts(e.full_message)
|
52
56
|
end
|
53
57
|
|
58
|
+
# Instantiate all discovered addon classes
|
59
|
+
self.addons = addon_classes.map(&:new)
|
60
|
+
|
54
61
|
# Activate each one of the discovered addons. If any problems occur in the addons, we don't want to
|
55
62
|
# fail to boot the server
|
56
63
|
addons.each do |addon|
|
57
64
|
addon.activate(message_queue)
|
58
|
-
nil
|
59
65
|
rescue => e
|
60
66
|
addon.add_error(e)
|
61
67
|
end
|
data/lib/ruby_lsp/internal.rb
CHANGED
@@ -7,13 +7,17 @@ yarp_require_paths = Gem.loaded_specs["yarp"]&.full_require_paths
|
|
7
7
|
$LOAD_PATH.delete_if { |path| yarp_require_paths.include?(path) } if yarp_require_paths
|
8
8
|
|
9
9
|
require "sorbet-runtime"
|
10
|
-
|
11
|
-
|
12
|
-
require "language_server-protocol"
|
10
|
+
|
11
|
+
# Set Bundler's UI level to silent as soon as possible to prevent any prints to STDOUT
|
13
12
|
require "bundler"
|
13
|
+
Bundler.ui.level = :silent
|
14
|
+
|
14
15
|
require "uri"
|
15
16
|
require "cgi"
|
16
17
|
require "set"
|
18
|
+
require "prism"
|
19
|
+
require "prism/visitor"
|
20
|
+
require "language_server-protocol"
|
17
21
|
|
18
22
|
require "ruby-lsp"
|
19
23
|
require "ruby_indexer/ruby_indexer"
|
@@ -29,5 +33,3 @@ require "ruby_lsp/ruby_document"
|
|
29
33
|
require "ruby_lsp/store"
|
30
34
|
require "ruby_lsp/addon"
|
31
35
|
require "ruby_lsp/requests/support/rubocop_runner"
|
32
|
-
|
33
|
-
Bundler.ui.level = :silent
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-02-
|
11
|
+
date: 2024-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: language_server-protocol
|
@@ -159,6 +159,7 @@ licenses:
|
|
159
159
|
- MIT
|
160
160
|
metadata:
|
161
161
|
allowed_push_host: https://rubygems.org
|
162
|
+
documentation_uri: https://shopify.github.io/ruby-lsp/
|
162
163
|
post_install_message:
|
163
164
|
rdoc_options: []
|
164
165
|
require_paths:
|