ruby-lsp-rails 0.3.29 → 0.3.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ruby_lsp/ruby_lsp_rails/server.rb +13 -3
- data/lib/ruby_lsp_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49634ac9d3fa4dd22f14f87ba41520ac0edbdee999157a46b354c1c6da36b855
|
4
|
+
data.tar.gz: 462413c2420e98671bee2aaadd5bb843e6b209a011fd375f6ef59f871cbb75d1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83f71eb4c8622c3652b561e0c5f4a4d3fa9de34b853e6fa5877435256b12b580c08a10ff8b1593d0224c48c0f9fec2ea633e4bdc9d6c2ae45cb292f6e681f67b
|
7
|
+
data.tar.gz: f4c7425425794e1e1b2cd3a24a5283397b702837a6383a2a617f3cffe97495b5afae44c0a96f6806ad17452c67bf6b2bd8aed84c23d6cab0b596f52ef3ee6fc7
|
@@ -4,9 +4,6 @@
|
|
4
4
|
require "json"
|
5
5
|
require "open3"
|
6
6
|
|
7
|
-
# NOTE: We should avoid printing to stderr since it causes problems. We never read the standard error pipe from the
|
8
|
-
# client, so it will become full and eventually hang or crash. Instead, return a response with an `error` key.
|
9
|
-
|
10
7
|
module RubyLsp
|
11
8
|
module Rails
|
12
9
|
module Common
|
@@ -125,6 +122,7 @@ module RubyLsp
|
|
125
122
|
|
126
123
|
def start
|
127
124
|
load_routes
|
125
|
+
clear_file_system_resolver_hooks
|
128
126
|
send_result({ message: "ok", root: ::Rails.root.to_s })
|
129
127
|
|
130
128
|
while @running
|
@@ -302,6 +300,18 @@ module RubyLsp
|
|
302
300
|
routes_reloader.execute_unless_loaded if routes_reloader&.respond_to?(:execute_unless_loaded)
|
303
301
|
end
|
304
302
|
end
|
303
|
+
|
304
|
+
# File system resolver hooks spawn file watcher threads which introduce unnecessary overhead since the LSP already
|
305
|
+
# watches files. Since the Rails application is already booted by the time we reach this script, we can't no-op
|
306
|
+
# the file watcher implementation. Instead, we clear the hooks to prevent the registered file watchers from being
|
307
|
+
# instantiated
|
308
|
+
def clear_file_system_resolver_hooks
|
309
|
+
return unless defined?(::ActionView::PathRegistry)
|
310
|
+
|
311
|
+
with_notification_error_handling("clear_file_system_resolver_hooks") do
|
312
|
+
::ActionView::PathRegistry.file_system_resolver_hooks.clear
|
313
|
+
end
|
314
|
+
end
|
305
315
|
end
|
306
316
|
end
|
307
317
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-lsp-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-01-
|
10
|
+
date: 2025-01-16 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: ruby-lsp
|