ruby-lsp 0.14.1 → 0.14.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5881826c3ac1a810dd585343edde142df892845da187fa12bb6e95073441b1c3
4
- data.tar.gz: 4fb97013a3ed44bef08cf0a42e1ed3439af38849cf36c1649bcdae317ff62e01
3
+ metadata.gz: 293c03761c9b7d497045546e3bf7ca88a08ed5556ad0ba52c205a9798e820ce5
4
+ data.tar.gz: 38157f012f3f1dc944186ac1530dc660d8662cb59ca7b12ad3b117655e0c1709
5
5
  SHA512:
6
- metadata.gz: 3cd87e2979f87711c141dcf78a9041e783d903289ce4edbef0cec238a4ed8291e936935cce043e8c455c8a0dfd1da8f57decf0765391b2c49a7c7e9b79fd3136
7
- data.tar.gz: 5a427cb75dd28cadd4d92992f4ba679510c281ca92ba8c39af973d4498cd575e3b4f5b30bc58e6417ad57f396a761fb5a0f37ce9a956f2ef616d43c0168aee90
6
+ metadata.gz: c4996e277088f015004df0f82e2cc47dc2f979f6658f9dfac19fe495c8c4deced3028b021e330ac0681dbfd79048e9033037c7ce93e6cc044c8ae6d91087e0df
7
+ data.tar.gz: 67c5c31c97c279f192b0b3d6c729c97a19f7aac4581eca037c0e5355cc0f3d3ed69fb4007a5f32985e046980324575e2e35a92ce81e8078b41ee5b6db711ac88
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.14.1
1
+ 0.14.2
data/exe/ruby-lsp-doctor CHANGED
@@ -6,6 +6,8 @@ require "ruby_lsp/internal"
6
6
 
7
7
  index = RubyIndexer::Index.new
8
8
 
9
+ puts "Globbing for indexable files"
10
+
9
11
  RubyIndexer.configuration.indexables.each do |indexable|
10
12
  puts "indexing: #{indexable.full_path}"
11
13
  content = File.read(indexable.full_path)
@@ -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
- addons << child_class.new
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
@@ -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
- require "prism"
11
- require "prism/visitor"
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.1
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-16 00:00:00.000000000 Z
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: