solargraph 0.51.2 → 0.54.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/.github/workflows/plugins.yml +40 -0
- data/.github/workflows/rspec.yml +1 -3
- data/.github/workflows/typecheck.yml +34 -0
- data/.yardopts +2 -2
- data/CHANGELOG.md +127 -5
- data/README.md +13 -16
- data/SPONSORS.md +1 -7
- data/lib/solargraph/api_map/cache.rb +50 -20
- data/lib/solargraph/api_map/source_to_yard.rb +17 -10
- data/lib/solargraph/api_map/store.rb +60 -15
- data/lib/solargraph/api_map.rb +282 -123
- data/lib/solargraph/bench.rb +3 -2
- data/lib/solargraph/cache.rb +29 -5
- data/lib/solargraph/complex_type/type_methods.rb +122 -39
- data/lib/solargraph/complex_type/unique_type.rb +310 -76
- data/lib/solargraph/complex_type.rb +166 -44
- data/lib/solargraph/convention.rb +0 -1
- data/lib/solargraph/converters/dd.rb +5 -0
- data/lib/solargraph/converters/dl.rb +3 -0
- data/lib/solargraph/converters/dt.rb +3 -0
- data/lib/solargraph/diagnostics/rubocop.rb +8 -7
- data/lib/solargraph/diagnostics/rubocop_helpers.rb +1 -0
- data/lib/solargraph/diagnostics/type_check.rb +1 -0
- data/lib/solargraph/diagnostics.rb +2 -2
- data/lib/solargraph/doc_map.rb +187 -0
- data/lib/solargraph/gem_pins.rb +72 -0
- data/lib/solargraph/language_server/host/diagnoser.rb +2 -2
- data/lib/solargraph/language_server/host/dispatch.rb +22 -5
- data/lib/solargraph/language_server/host/message_worker.rb +49 -5
- data/lib/solargraph/language_server/host/sources.rb +8 -65
- data/lib/solargraph/language_server/host.rb +65 -84
- data/lib/solargraph/language_server/message/base.rb +19 -12
- data/lib/solargraph/language_server/message/completion_item/resolve.rb +3 -1
- data/lib/solargraph/language_server/message/extended/check_gem_version.rb +13 -1
- data/lib/solargraph/language_server/message/initialize.rb +19 -2
- data/lib/solargraph/language_server/message/text_document/completion.rb +0 -3
- data/lib/solargraph/language_server/message/text_document/definition.rb +3 -3
- data/lib/solargraph/language_server/message/text_document/document_symbol.rb +3 -3
- data/lib/solargraph/language_server/message/text_document/formatting.rb +1 -0
- data/lib/solargraph/language_server/message/text_document/hover.rb +3 -1
- data/lib/solargraph/language_server/message/text_document/type_definition.rb +3 -3
- data/lib/solargraph/language_server/message/text_document.rb +0 -1
- data/lib/solargraph/language_server/message/workspace/did_change_configuration.rb +5 -0
- data/lib/solargraph/language_server/message/workspace/workspace_symbol.rb +2 -2
- data/lib/solargraph/language_server/progress.rb +135 -0
- data/lib/solargraph/language_server/transport/adapter.rb +16 -1
- data/lib/solargraph/language_server/transport/data_reader.rb +2 -0
- data/lib/solargraph/language_server.rb +1 -0
- data/lib/solargraph/library.rb +207 -111
- data/lib/solargraph/location.rb +15 -1
- data/lib/solargraph/page.rb +6 -0
- data/lib/solargraph/parser/comment_ripper.rb +4 -0
- data/lib/solargraph/parser/node_methods.rb +47 -7
- data/lib/solargraph/parser/node_processor/base.rb +11 -1
- data/lib/solargraph/parser/node_processor.rb +1 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/class_methods.rb +31 -9
- data/lib/solargraph/parser/{legacy → parser_gem}/flawed_builder.rb +3 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_chainer.rb +62 -43
- data/lib/solargraph/parser/parser_gem/node_methods.rb +495 -0
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/alias_node.rb +1 -1
- data/lib/solargraph/parser/parser_gem/node_processors/args_node.rb +57 -0
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/begin_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/block_node.rb +3 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/casgn_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/cvasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/def_node.rb +7 -20
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/defs_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/gvasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/ivasgn_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/lvasgn_node.rb +4 -4
- data/lib/solargraph/parser/parser_gem/node_processors/masgn_node.rb +53 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/namespace_node.rb +2 -2
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/orasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/resbody_node.rb +3 -3
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/sclass_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/send_node.rb +8 -6
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/sym_node.rb +1 -1
- data/lib/solargraph/parser/parser_gem/node_processors.rb +56 -0
- data/lib/solargraph/parser/parser_gem.rb +12 -0
- data/lib/solargraph/parser/region.rb +1 -1
- data/lib/solargraph/parser/snippet.rb +2 -0
- data/lib/solargraph/parser.rb +8 -12
- data/lib/solargraph/pin/base.rb +78 -10
- data/lib/solargraph/pin/base_variable.rb +40 -7
- data/lib/solargraph/pin/block.rb +69 -46
- data/lib/solargraph/pin/callable.rb +147 -0
- data/lib/solargraph/pin/closure.rb +23 -3
- data/lib/solargraph/pin/common.rb +6 -6
- data/lib/solargraph/pin/conversions.rb +36 -5
- data/lib/solargraph/pin/delegated_method.rb +6 -2
- data/lib/solargraph/pin/documenting.rb +25 -32
- data/lib/solargraph/pin/instance_variable.rb +6 -2
- data/lib/solargraph/pin/local_variable.rb +13 -1
- data/lib/solargraph/pin/method.rb +205 -32
- data/lib/solargraph/pin/namespace.rb +20 -7
- data/lib/solargraph/pin/parameter.rb +41 -36
- data/lib/solargraph/pin/proxy_type.rb +1 -1
- data/lib/solargraph/pin/reference/override.rb +2 -2
- data/lib/solargraph/pin/reference.rb +8 -0
- data/lib/solargraph/pin/search.rb +3 -3
- data/lib/solargraph/pin/signature.rb +8 -14
- data/lib/solargraph/pin.rb +4 -2
- data/lib/solargraph/range.rb +4 -6
- data/lib/solargraph/rbs_map/conversions.rb +326 -76
- data/lib/solargraph/rbs_map/core_fills.rb +16 -33
- data/lib/solargraph/rbs_map/core_map.rb +3 -13
- data/lib/solargraph/rbs_map/stdlib_map.rb +2 -8
- data/lib/solargraph/rbs_map.rb +32 -13
- data/lib/solargraph/shell.rb +95 -72
- data/lib/solargraph/source/chain/array.rb +33 -0
- data/lib/solargraph/source/chain/block_symbol.rb +13 -0
- data/lib/solargraph/source/chain/block_variable.rb +1 -1
- data/lib/solargraph/source/chain/call.rb +152 -69
- data/lib/solargraph/source/chain/constant.rb +15 -1
- data/lib/solargraph/source/chain/if.rb +23 -0
- data/lib/solargraph/source/chain/link.rb +17 -2
- data/lib/solargraph/source/chain/or.rb +2 -2
- data/lib/solargraph/source/chain/z_super.rb +3 -3
- data/lib/solargraph/source/chain.rb +85 -26
- data/lib/solargraph/source/change.rb +3 -0
- data/lib/solargraph/source/cursor.rb +16 -2
- data/lib/solargraph/source/source_chainer.rb +8 -5
- data/lib/solargraph/source/updater.rb +1 -0
- data/lib/solargraph/source.rb +120 -148
- data/lib/solargraph/source_map/clip.rb +16 -27
- data/lib/solargraph/source_map/data.rb +30 -0
- data/lib/solargraph/source_map/mapper.rb +15 -3
- data/lib/solargraph/source_map.rb +48 -24
- data/lib/solargraph/type_checker/checks.rb +10 -2
- data/lib/solargraph/type_checker/rules.rb +6 -1
- data/lib/solargraph/type_checker.rb +150 -39
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/views/environment.erb +3 -5
- data/lib/solargraph/workspace/config.rb +9 -6
- data/lib/solargraph/workspace.rb +30 -3
- data/lib/solargraph/yard_map/cache.rb +6 -0
- data/lib/solargraph/yard_map/helpers.rb +1 -1
- data/lib/solargraph/yard_map/mapper/to_method.rb +16 -3
- data/lib/solargraph/yard_map/mapper.rb +1 -1
- data/lib/solargraph/yard_map/to_method.rb +11 -4
- data/lib/solargraph/yard_map.rb +1 -292
- data/lib/solargraph/yard_tags.rb +20 -0
- data/lib/solargraph/yardoc.rb +52 -0
- data/lib/solargraph.rb +6 -4
- data/solargraph.gemspec +7 -6
- metadata +71 -82
- data/lib/solargraph/api_map/bundler_methods.rb +0 -22
- data/lib/solargraph/documentor.rb +0 -76
- data/lib/solargraph/language_server/host/cataloger.rb +0 -56
- data/lib/solargraph/parser/legacy/node_methods.rb +0 -325
- data/lib/solargraph/parser/legacy/node_processors/alias_node.rb +0 -23
- data/lib/solargraph/parser/legacy/node_processors/args_node.rb +0 -50
- data/lib/solargraph/parser/legacy/node_processors/begin_node.rb +0 -15
- data/lib/solargraph/parser/legacy/node_processors/sym_node.rb +0 -18
- data/lib/solargraph/parser/legacy/node_processors.rb +0 -55
- data/lib/solargraph/parser/legacy.rb +0 -12
- data/lib/solargraph/parser/rubyvm/class_methods.rb +0 -153
- data/lib/solargraph/parser/rubyvm/node_chainer.rb +0 -160
- data/lib/solargraph/parser/rubyvm/node_methods.rb +0 -317
- data/lib/solargraph/parser/rubyvm/node_processors/args_node.rb +0 -85
- data/lib/solargraph/parser/rubyvm/node_processors/block_node.rb +0 -42
- data/lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb +0 -33
- data/lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb +0 -23
- data/lib/solargraph/parser/rubyvm/node_processors/def_node.rb +0 -75
- data/lib/solargraph/parser/rubyvm/node_processors/defs_node.rb +0 -68
- data/lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb +0 -23
- data/lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb +0 -38
- data/lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb +0 -39
- data/lib/solargraph/parser/rubyvm/node_processors/lit_node.rb +0 -20
- data/lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb +0 -27
- data/lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb +0 -39
- data/lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb +0 -26
- data/lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb +0 -15
- data/lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb +0 -51
- data/lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb +0 -32
- data/lib/solargraph/parser/rubyvm/node_processors/scope_node.rb +0 -15
- data/lib/solargraph/parser/rubyvm/node_processors/send_node.rb +0 -279
- data/lib/solargraph/parser/rubyvm/node_processors.rb +0 -64
- data/lib/solargraph/parser/rubyvm/node_wrapper.rb +0 -47
- data/lib/solargraph/parser/rubyvm.rb +0 -40
- data/lib/solargraph/rbs_map/core_signs.rb +0 -33
- data/lib/yard-solargraph.rb +0 -33
data/lib/solargraph.rb
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
Encoding.default_external = 'UTF-8'
|
4
4
|
|
5
|
+
require 'set'
|
6
|
+
require 'yard-solargraph'
|
7
|
+
require 'solargraph/yard_tags'
|
5
8
|
require 'solargraph/version'
|
6
9
|
|
7
10
|
# The top-level namespace for the Solargraph code mapping, documentation,
|
@@ -24,8 +27,10 @@ module Solargraph
|
|
24
27
|
autoload :Source, 'solargraph/source'
|
25
28
|
autoload :SourceMap, 'solargraph/source_map'
|
26
29
|
autoload :ApiMap, 'solargraph/api_map'
|
30
|
+
autoload :Yardoc, 'solargraph/yardoc'
|
27
31
|
autoload :YardMap, 'solargraph/yard_map'
|
28
32
|
autoload :Pin, 'solargraph/pin'
|
33
|
+
autoload :DocMap, 'solargraph/doc_map'
|
29
34
|
autoload :ServerMethods, 'solargraph/server_methods'
|
30
35
|
autoload :LanguageServer, 'solargraph/language_server'
|
31
36
|
autoload :Workspace, 'solargraph/workspace'
|
@@ -38,13 +43,12 @@ module Solargraph
|
|
38
43
|
autoload :TypeChecker, 'solargraph/type_checker'
|
39
44
|
autoload :Environ, 'solargraph/environ'
|
40
45
|
autoload :Convention, 'solargraph/convention'
|
41
|
-
autoload :Documentor, 'solargraph/documentor'
|
42
46
|
autoload :Parser, 'solargraph/parser'
|
43
47
|
autoload :RbsMap, 'solargraph/rbs_map'
|
48
|
+
autoload :GemPins, 'solargraph/gem_pins'
|
44
49
|
autoload :Cache, 'solargraph/cache'
|
45
50
|
|
46
51
|
dir = File.dirname(__FILE__)
|
47
|
-
YARD_EXTENSION_FILE = File.join(dir, 'yard-solargraph.rb')
|
48
52
|
VIEWS_PATH = File.join(dir, 'solargraph', 'views')
|
49
53
|
|
50
54
|
# A convenience method for Solargraph::Logging.logger.
|
@@ -56,8 +60,6 @@ module Solargraph
|
|
56
60
|
|
57
61
|
# A helper method that runs Bundler.with_unbundled_env or falls back to
|
58
62
|
# Bundler.with_clean_env for earlier versions of Bundler.
|
59
|
-
#
|
60
|
-
# @return [void]
|
61
63
|
def self.with_clean_env &block
|
62
64
|
meth = if Bundler.respond_to?(:with_original_env)
|
63
65
|
:with_original_env
|
data/solargraph.gemspec
CHANGED
@@ -21,10 +21,10 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.metadata["changelog_uri"] = "https://github.com/castwide/solargraph/blob/master/CHANGELOG.md"
|
22
22
|
s.metadata["source_code_uri"] = "https://github.com/castwide/solargraph"
|
23
23
|
|
24
|
-
s.required_ruby_version = '>=
|
24
|
+
s.required_ruby_version = '>= 3.0'
|
25
25
|
|
26
26
|
s.add_runtime_dependency 'backport', '~> 1.2'
|
27
|
-
s.add_runtime_dependency 'benchmark'
|
27
|
+
s.add_runtime_dependency 'benchmark', '~> 0.4'
|
28
28
|
s.add_runtime_dependency 'bundler', '~> 2.0'
|
29
29
|
s.add_runtime_dependency 'diff-lcs', '~> 1.4'
|
30
30
|
s.add_runtime_dependency 'jaro_winkler', '~> 1.6'
|
@@ -34,19 +34,20 @@ Gem::Specification.new do |s|
|
|
34
34
|
s.add_runtime_dependency 'observer', '~> 0.1'
|
35
35
|
s.add_runtime_dependency 'ostruct', '~> 0.6'
|
36
36
|
s.add_runtime_dependency 'parser', '~> 3.0'
|
37
|
-
s.add_runtime_dependency 'rbs', '~> 3.
|
38
|
-
s.add_runtime_dependency 'reverse_markdown', '
|
37
|
+
s.add_runtime_dependency 'rbs', '~> 3.3'
|
38
|
+
s.add_runtime_dependency 'reverse_markdown', '~> 3.0'
|
39
39
|
s.add_runtime_dependency 'rubocop', '~> 1.38'
|
40
40
|
s.add_runtime_dependency 'thor', '~> 1.0'
|
41
41
|
s.add_runtime_dependency 'tilt', '~> 2.0'
|
42
42
|
s.add_runtime_dependency 'yard', '~> 0.9', '>= 0.9.24'
|
43
|
+
s.add_runtime_dependency 'yard-solargraph', '~> 0.1'
|
43
44
|
|
44
|
-
s.add_development_dependency 'pry'
|
45
|
+
s.add_development_dependency 'pry', '~> 0.15'
|
45
46
|
s.add_development_dependency 'public_suffix', '~> 3.1'
|
46
47
|
s.add_development_dependency 'rake', '~> 13.2'
|
47
48
|
s.add_development_dependency 'rspec', '~> 3.5'
|
48
49
|
s.add_development_dependency 'simplecov', '~> 0.14'
|
49
50
|
s.add_development_dependency 'webmock', '~> 3.6'
|
50
51
|
# work around missing yard dependency needed as of Ruby 3.5
|
51
|
-
s.add_development_dependency 'irb'
|
52
|
+
s.add_development_dependency 'irb', '~> 1.15'
|
52
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.54.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: benchmark
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
33
|
+
version: '0.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
40
|
+
version: '0.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,34 +170,28 @@ dependencies:
|
|
170
170
|
requirements:
|
171
171
|
- - "~>"
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: '3.
|
173
|
+
version: '3.3'
|
174
174
|
type: :runtime
|
175
175
|
prerelease: false
|
176
176
|
version_requirements: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - "~>"
|
179
179
|
- !ruby/object:Gem::Version
|
180
|
-
version: '3.
|
180
|
+
version: '3.3'
|
181
181
|
- !ruby/object:Gem::Dependency
|
182
182
|
name: reverse_markdown
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
184
184
|
requirements:
|
185
|
-
- - "
|
186
|
-
- !ruby/object:Gem::Version
|
187
|
-
version: '2.0'
|
188
|
-
- - "<"
|
185
|
+
- - "~>"
|
189
186
|
- !ruby/object:Gem::Version
|
190
|
-
version: '
|
187
|
+
version: '3.0'
|
191
188
|
type: :runtime
|
192
189
|
prerelease: false
|
193
190
|
version_requirements: !ruby/object:Gem::Requirement
|
194
191
|
requirements:
|
195
|
-
- - "
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '2.0'
|
198
|
-
- - "<"
|
192
|
+
- - "~>"
|
199
193
|
- !ruby/object:Gem::Version
|
200
|
-
version: '
|
194
|
+
version: '3.0'
|
201
195
|
- !ruby/object:Gem::Dependency
|
202
196
|
name: rubocop
|
203
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -260,20 +254,34 @@ dependencies:
|
|
260
254
|
- - ">="
|
261
255
|
- !ruby/object:Gem::Version
|
262
256
|
version: 0.9.24
|
257
|
+
- !ruby/object:Gem::Dependency
|
258
|
+
name: yard-solargraph
|
259
|
+
requirement: !ruby/object:Gem::Requirement
|
260
|
+
requirements:
|
261
|
+
- - "~>"
|
262
|
+
- !ruby/object:Gem::Version
|
263
|
+
version: '0.1'
|
264
|
+
type: :runtime
|
265
|
+
prerelease: false
|
266
|
+
version_requirements: !ruby/object:Gem::Requirement
|
267
|
+
requirements:
|
268
|
+
- - "~>"
|
269
|
+
- !ruby/object:Gem::Version
|
270
|
+
version: '0.1'
|
263
271
|
- !ruby/object:Gem::Dependency
|
264
272
|
name: pry
|
265
273
|
requirement: !ruby/object:Gem::Requirement
|
266
274
|
requirements:
|
267
|
-
- - "
|
275
|
+
- - "~>"
|
268
276
|
- !ruby/object:Gem::Version
|
269
|
-
version: '0'
|
277
|
+
version: '0.15'
|
270
278
|
type: :development
|
271
279
|
prerelease: false
|
272
280
|
version_requirements: !ruby/object:Gem::Requirement
|
273
281
|
requirements:
|
274
|
-
- - "
|
282
|
+
- - "~>"
|
275
283
|
- !ruby/object:Gem::Version
|
276
|
-
version: '0'
|
284
|
+
version: '0.15'
|
277
285
|
- !ruby/object:Gem::Dependency
|
278
286
|
name: public_suffix
|
279
287
|
requirement: !ruby/object:Gem::Requirement
|
@@ -348,16 +356,16 @@ dependencies:
|
|
348
356
|
name: irb
|
349
357
|
requirement: !ruby/object:Gem::Requirement
|
350
358
|
requirements:
|
351
|
-
- - "
|
359
|
+
- - "~>"
|
352
360
|
- !ruby/object:Gem::Version
|
353
|
-
version: '
|
361
|
+
version: '1.15'
|
354
362
|
type: :development
|
355
363
|
prerelease: false
|
356
364
|
version_requirements: !ruby/object:Gem::Requirement
|
357
365
|
requirements:
|
358
|
-
- - "
|
366
|
+
- - "~>"
|
359
367
|
- !ruby/object:Gem::Version
|
360
|
-
version: '
|
368
|
+
version: '1.15'
|
361
369
|
description: IDE tools for code completion, inline documentation, and static analysis
|
362
370
|
email: admin@castwide.com
|
363
371
|
executables:
|
@@ -366,7 +374,9 @@ extensions: []
|
|
366
374
|
extra_rdoc_files: []
|
367
375
|
files:
|
368
376
|
- ".github/FUNDING.yml"
|
377
|
+
- ".github/workflows/plugins.yml"
|
369
378
|
- ".github/workflows/rspec.yml"
|
379
|
+
- ".github/workflows/typecheck.yml"
|
370
380
|
- ".gitignore"
|
371
381
|
- ".rspec"
|
372
382
|
- ".yardopts"
|
@@ -380,7 +390,6 @@ files:
|
|
380
390
|
- lib/.rubocop.yml
|
381
391
|
- lib/solargraph.rb
|
382
392
|
- lib/solargraph/api_map.rb
|
383
|
-
- lib/solargraph/api_map/bundler_methods.rb
|
384
393
|
- lib/solargraph/api_map/cache.rb
|
385
394
|
- lib/solargraph/api_map/source_to_yard.rb
|
386
395
|
- lib/solargraph/api_map/store.rb
|
@@ -406,13 +415,13 @@ files:
|
|
406
415
|
- lib/solargraph/diagnostics/severities.rb
|
407
416
|
- lib/solargraph/diagnostics/type_check.rb
|
408
417
|
- lib/solargraph/diagnostics/update_errors.rb
|
409
|
-
- lib/solargraph/
|
418
|
+
- lib/solargraph/doc_map.rb
|
410
419
|
- lib/solargraph/environ.rb
|
420
|
+
- lib/solargraph/gem_pins.rb
|
411
421
|
- lib/solargraph/language_server.rb
|
412
422
|
- lib/solargraph/language_server/completion_item_kinds.rb
|
413
423
|
- lib/solargraph/language_server/error_codes.rb
|
414
424
|
- lib/solargraph/language_server/host.rb
|
415
|
-
- lib/solargraph/language_server/host/cataloger.rb
|
416
425
|
- lib/solargraph/language_server/host/diagnoser.rb
|
417
426
|
- lib/solargraph/language_server/host/dispatch.rb
|
418
427
|
- lib/solargraph/language_server/host/message_worker.rb
|
@@ -463,6 +472,7 @@ files:
|
|
463
472
|
- lib/solargraph/language_server/message/workspace/did_change_workspace_folders.rb
|
464
473
|
- lib/solargraph/language_server/message/workspace/workspace_symbol.rb
|
465
474
|
- lib/solargraph/language_server/message_types.rb
|
475
|
+
- lib/solargraph/language_server/progress.rb
|
466
476
|
- lib/solargraph/language_server/request.rb
|
467
477
|
- lib/solargraph/language_server/symbol_kinds.rb
|
468
478
|
- lib/solargraph/language_server/transport.rb
|
@@ -475,65 +485,40 @@ files:
|
|
475
485
|
- lib/solargraph/page.rb
|
476
486
|
- lib/solargraph/parser.rb
|
477
487
|
- lib/solargraph/parser/comment_ripper.rb
|
478
|
-
- lib/solargraph/parser/legacy.rb
|
479
|
-
- lib/solargraph/parser/legacy/class_methods.rb
|
480
|
-
- lib/solargraph/parser/legacy/flawed_builder.rb
|
481
|
-
- lib/solargraph/parser/legacy/node_chainer.rb
|
482
|
-
- lib/solargraph/parser/legacy/node_methods.rb
|
483
|
-
- lib/solargraph/parser/legacy/node_processors.rb
|
484
|
-
- lib/solargraph/parser/legacy/node_processors/alias_node.rb
|
485
|
-
- lib/solargraph/parser/legacy/node_processors/args_node.rb
|
486
|
-
- lib/solargraph/parser/legacy/node_processors/begin_node.rb
|
487
|
-
- lib/solargraph/parser/legacy/node_processors/block_node.rb
|
488
|
-
- lib/solargraph/parser/legacy/node_processors/casgn_node.rb
|
489
|
-
- lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb
|
490
|
-
- lib/solargraph/parser/legacy/node_processors/def_node.rb
|
491
|
-
- lib/solargraph/parser/legacy/node_processors/defs_node.rb
|
492
|
-
- lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb
|
493
|
-
- lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb
|
494
|
-
- lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb
|
495
|
-
- lib/solargraph/parser/legacy/node_processors/namespace_node.rb
|
496
|
-
- lib/solargraph/parser/legacy/node_processors/orasgn_node.rb
|
497
|
-
- lib/solargraph/parser/legacy/node_processors/resbody_node.rb
|
498
|
-
- lib/solargraph/parser/legacy/node_processors/sclass_node.rb
|
499
|
-
- lib/solargraph/parser/legacy/node_processors/send_node.rb
|
500
|
-
- lib/solargraph/parser/legacy/node_processors/sym_node.rb
|
501
488
|
- lib/solargraph/parser/node_methods.rb
|
502
489
|
- lib/solargraph/parser/node_processor.rb
|
503
490
|
- lib/solargraph/parser/node_processor/base.rb
|
491
|
+
- lib/solargraph/parser/parser_gem.rb
|
492
|
+
- lib/solargraph/parser/parser_gem/class_methods.rb
|
493
|
+
- lib/solargraph/parser/parser_gem/flawed_builder.rb
|
494
|
+
- lib/solargraph/parser/parser_gem/node_chainer.rb
|
495
|
+
- lib/solargraph/parser/parser_gem/node_methods.rb
|
496
|
+
- lib/solargraph/parser/parser_gem/node_processors.rb
|
497
|
+
- lib/solargraph/parser/parser_gem/node_processors/alias_node.rb
|
498
|
+
- lib/solargraph/parser/parser_gem/node_processors/args_node.rb
|
499
|
+
- lib/solargraph/parser/parser_gem/node_processors/begin_node.rb
|
500
|
+
- lib/solargraph/parser/parser_gem/node_processors/block_node.rb
|
501
|
+
- lib/solargraph/parser/parser_gem/node_processors/casgn_node.rb
|
502
|
+
- lib/solargraph/parser/parser_gem/node_processors/cvasgn_node.rb
|
503
|
+
- lib/solargraph/parser/parser_gem/node_processors/def_node.rb
|
504
|
+
- lib/solargraph/parser/parser_gem/node_processors/defs_node.rb
|
505
|
+
- lib/solargraph/parser/parser_gem/node_processors/gvasgn_node.rb
|
506
|
+
- lib/solargraph/parser/parser_gem/node_processors/ivasgn_node.rb
|
507
|
+
- lib/solargraph/parser/parser_gem/node_processors/lvasgn_node.rb
|
508
|
+
- lib/solargraph/parser/parser_gem/node_processors/masgn_node.rb
|
509
|
+
- lib/solargraph/parser/parser_gem/node_processors/namespace_node.rb
|
510
|
+
- lib/solargraph/parser/parser_gem/node_processors/orasgn_node.rb
|
511
|
+
- lib/solargraph/parser/parser_gem/node_processors/resbody_node.rb
|
512
|
+
- lib/solargraph/parser/parser_gem/node_processors/sclass_node.rb
|
513
|
+
- lib/solargraph/parser/parser_gem/node_processors/send_node.rb
|
514
|
+
- lib/solargraph/parser/parser_gem/node_processors/sym_node.rb
|
504
515
|
- lib/solargraph/parser/region.rb
|
505
|
-
- lib/solargraph/parser/rubyvm.rb
|
506
|
-
- lib/solargraph/parser/rubyvm/class_methods.rb
|
507
|
-
- lib/solargraph/parser/rubyvm/node_chainer.rb
|
508
|
-
- lib/solargraph/parser/rubyvm/node_methods.rb
|
509
|
-
- lib/solargraph/parser/rubyvm/node_processors.rb
|
510
|
-
- lib/solargraph/parser/rubyvm/node_processors/alias_node.rb
|
511
|
-
- lib/solargraph/parser/rubyvm/node_processors/args_node.rb
|
512
|
-
- lib/solargraph/parser/rubyvm/node_processors/begin_node.rb
|
513
|
-
- lib/solargraph/parser/rubyvm/node_processors/block_node.rb
|
514
|
-
- lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb
|
515
|
-
- lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb
|
516
|
-
- lib/solargraph/parser/rubyvm/node_processors/def_node.rb
|
517
|
-
- lib/solargraph/parser/rubyvm/node_processors/defs_node.rb
|
518
|
-
- lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb
|
519
|
-
- lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb
|
520
|
-
- lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb
|
521
|
-
- lib/solargraph/parser/rubyvm/node_processors/lit_node.rb
|
522
|
-
- lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb
|
523
|
-
- lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb
|
524
|
-
- lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb
|
525
|
-
- lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb
|
526
|
-
- lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb
|
527
|
-
- lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb
|
528
|
-
- lib/solargraph/parser/rubyvm/node_processors/scope_node.rb
|
529
|
-
- lib/solargraph/parser/rubyvm/node_processors/send_node.rb
|
530
|
-
- lib/solargraph/parser/rubyvm/node_processors/sym_node.rb
|
531
|
-
- lib/solargraph/parser/rubyvm/node_wrapper.rb
|
532
516
|
- lib/solargraph/parser/snippet.rb
|
533
517
|
- lib/solargraph/pin.rb
|
534
518
|
- lib/solargraph/pin/base.rb
|
535
519
|
- lib/solargraph/pin/base_variable.rb
|
536
520
|
- lib/solargraph/pin/block.rb
|
521
|
+
- lib/solargraph/pin/callable.rb
|
537
522
|
- lib/solargraph/pin/class_variable.rb
|
538
523
|
- lib/solargraph/pin/closure.rb
|
539
524
|
- lib/solargraph/pin/common.rb
|
@@ -569,12 +554,13 @@ files:
|
|
569
554
|
- lib/solargraph/rbs_map/conversions.rb
|
570
555
|
- lib/solargraph/rbs_map/core_fills.rb
|
571
556
|
- lib/solargraph/rbs_map/core_map.rb
|
572
|
-
- lib/solargraph/rbs_map/core_signs.rb
|
573
557
|
- lib/solargraph/rbs_map/stdlib_map.rb
|
574
558
|
- lib/solargraph/server_methods.rb
|
575
559
|
- lib/solargraph/shell.rb
|
576
560
|
- lib/solargraph/source.rb
|
577
561
|
- lib/solargraph/source/chain.rb
|
562
|
+
- lib/solargraph/source/chain/array.rb
|
563
|
+
- lib/solargraph/source/chain/block_symbol.rb
|
578
564
|
- lib/solargraph/source/chain/block_variable.rb
|
579
565
|
- lib/solargraph/source/chain/call.rb
|
580
566
|
- lib/solargraph/source/chain/class_variable.rb
|
@@ -582,6 +568,7 @@ files:
|
|
582
568
|
- lib/solargraph/source/chain/global_variable.rb
|
583
569
|
- lib/solargraph/source/chain/hash.rb
|
584
570
|
- lib/solargraph/source/chain/head.rb
|
571
|
+
- lib/solargraph/source/chain/if.rb
|
585
572
|
- lib/solargraph/source/chain/instance_variable.rb
|
586
573
|
- lib/solargraph/source/chain/link.rb
|
587
574
|
- lib/solargraph/source/chain/literal.rb
|
@@ -597,6 +584,7 @@ files:
|
|
597
584
|
- lib/solargraph/source_map.rb
|
598
585
|
- lib/solargraph/source_map/clip.rb
|
599
586
|
- lib/solargraph/source_map/completion.rb
|
587
|
+
- lib/solargraph/source_map/data.rb
|
600
588
|
- lib/solargraph/source_map/mapper.rb
|
601
589
|
- lib/solargraph/type_checker.rb
|
602
590
|
- lib/solargraph/type_checker/checks.rb
|
@@ -621,7 +609,8 @@ files:
|
|
621
609
|
- lib/solargraph/yard_map/mapper/to_method.rb
|
622
610
|
- lib/solargraph/yard_map/mapper/to_namespace.rb
|
623
611
|
- lib/solargraph/yard_map/to_method.rb
|
624
|
-
- lib/
|
612
|
+
- lib/solargraph/yard_tags.rb
|
613
|
+
- lib/solargraph/yardoc.rb
|
625
614
|
- solargraph.gemspec
|
626
615
|
homepage: https://solargraph.org
|
627
616
|
licenses:
|
@@ -639,7 +628,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
639
628
|
requirements:
|
640
629
|
- - ">="
|
641
630
|
- !ruby/object:Gem::Version
|
642
|
-
version: '
|
631
|
+
version: '3.0'
|
643
632
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
644
633
|
requirements:
|
645
634
|
- - ">="
|
@@ -1,22 +0,0 @@
|
|
1
|
-
require 'bundler'
|
2
|
-
require 'shellwords'
|
3
|
-
|
4
|
-
module Solargraph
|
5
|
-
class ApiMap
|
6
|
-
module BundlerMethods
|
7
|
-
module_function
|
8
|
-
|
9
|
-
# @param directory [String]
|
10
|
-
# @return [Hash]
|
11
|
-
def require_from_bundle directory
|
12
|
-
begin
|
13
|
-
Solargraph.logger.info "Loading gems for bundler/require"
|
14
|
-
Documentor.specs_from_bundle(directory)
|
15
|
-
rescue BundleNotFoundError => e
|
16
|
-
Solargraph.logger.warn e.message
|
17
|
-
{}
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
@@ -1,76 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler'
|
4
|
-
require 'json'
|
5
|
-
require 'open3'
|
6
|
-
require 'shellwords'
|
7
|
-
require 'yard'
|
8
|
-
require 'fileutils'
|
9
|
-
|
10
|
-
module Solargraph
|
11
|
-
class Documentor
|
12
|
-
RDOC_GEMS = %w[
|
13
|
-
actioncable actionmailbox actionmailer actionpack actiontext actionview
|
14
|
-
activejob activemodel activerecord activestorage activesupport railties
|
15
|
-
]
|
16
|
-
|
17
|
-
def initialize directory, rebuild: false, out: File.new(File::NULL, 'w')
|
18
|
-
@directory = directory
|
19
|
-
@rebuild = rebuild
|
20
|
-
@out = out
|
21
|
-
end
|
22
|
-
|
23
|
-
# @return [Boolean] True if all specs were found and documented.
|
24
|
-
def document
|
25
|
-
failures = 0
|
26
|
-
Documentor.specs_from_bundle(@directory).each_pair do |name, version|
|
27
|
-
yd = YARD::Registry.yardoc_file_for_gem(name, "= #{version}")
|
28
|
-
if !yd || @rebuild
|
29
|
-
FileUtils.safe_unlink File.join(YardMap::CoreDocs.cache_dir, 'gems', "#{name}-#{version}.ser")
|
30
|
-
@out.puts "Documenting #{name} #{version}"
|
31
|
-
`yard gems #{name} #{version} #{@rebuild ? '--rebuild' : ''}`
|
32
|
-
yd = YARD::Registry.yardoc_file_for_gem(name, "= #{version}")
|
33
|
-
# HACK: Ignore errors documenting bundler
|
34
|
-
if !yd && name != 'bundler'
|
35
|
-
@out.puts "#{name} #{version} YARD documentation failed"
|
36
|
-
failures += 1
|
37
|
-
end
|
38
|
-
end
|
39
|
-
if yd && RDOC_GEMS.include?(name)
|
40
|
-
cache = File.join(Solargraph::YardMap::CoreDocs.cache_dir, 'gems', "#{name}-#{version}", 'yardoc')
|
41
|
-
if !File.exist?(cache) || @rebuild
|
42
|
-
@out.puts "Caching custom documentation for #{name} #{version}"
|
43
|
-
spec = Gem::Specification.find_by_name(name, "= #{version}")
|
44
|
-
Solargraph::YardMap::RdocToYard.run(spec)
|
45
|
-
end
|
46
|
-
end
|
47
|
-
end
|
48
|
-
if failures > 0
|
49
|
-
@out.puts "#{failures} gem#{failures == 1 ? '' : 's'} could not be documented. You might need to run `bundle install`."
|
50
|
-
end
|
51
|
-
failures == 0
|
52
|
-
rescue Solargraph::BundleNotFoundError => e
|
53
|
-
@out.puts "[#{e.class}] #{e.message}"
|
54
|
-
@out.puts "No bundled gems are available in #{@directory}"
|
55
|
-
false
|
56
|
-
end
|
57
|
-
|
58
|
-
# @param directory [String]
|
59
|
-
# @return [Hash]
|
60
|
-
def self.specs_from_bundle directory
|
61
|
-
Solargraph.with_clean_env do
|
62
|
-
cmd = [
|
63
|
-
'ruby', '-e',
|
64
|
-
"require 'bundler'; require 'json'; Dir.chdir('#{directory}') { puts Bundler.definition.specs_for([:default]).map { |spec| [spec.name, spec.version] }.to_h.to_json }"
|
65
|
-
]
|
66
|
-
o, e, s = Open3.capture3(*cmd)
|
67
|
-
if s.success?
|
68
|
-
o && !o.empty? ? JSON.parse(o.split("\n").last) : {}
|
69
|
-
else
|
70
|
-
Solargraph.logger.warn e
|
71
|
-
raise BundleNotFoundError, "Failed to load gems from bundle at #{directory}"
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module Solargraph
|
4
|
-
module LanguageServer
|
5
|
-
class Host
|
6
|
-
# An asynchronous library cataloging handler.
|
7
|
-
#
|
8
|
-
class Cataloger
|
9
|
-
def initialize host
|
10
|
-
@host = host
|
11
|
-
@stopped = true
|
12
|
-
end
|
13
|
-
|
14
|
-
# Stop the catalog thread.
|
15
|
-
#
|
16
|
-
# @return [void]
|
17
|
-
def stop
|
18
|
-
@stopped = true
|
19
|
-
end
|
20
|
-
|
21
|
-
# True if the cataloger is stopped.
|
22
|
-
#
|
23
|
-
# @return [Boolean]
|
24
|
-
def stopped?
|
25
|
-
@stopped
|
26
|
-
end
|
27
|
-
|
28
|
-
# Start the catalog thread.
|
29
|
-
#
|
30
|
-
# @return [void]
|
31
|
-
def start
|
32
|
-
return unless stopped?
|
33
|
-
@stopped = false
|
34
|
-
Thread.new do
|
35
|
-
until stopped?
|
36
|
-
tick
|
37
|
-
sleep 0.1
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# Perform cataloging.
|
43
|
-
#
|
44
|
-
# @return [void]
|
45
|
-
def tick
|
46
|
-
host.catalog
|
47
|
-
end
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
# @return [Host]
|
52
|
-
attr_reader :host
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|