solargraph 0.50.0 → 0.53.0
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 +4 -8
- data/.github/workflows/typecheck.yml +34 -0
- data/.yardopts +2 -2
- data/CHANGELOG.md +81 -3
- data/README.md +13 -16
- data/SPONSORS.md +2 -9
- data/lib/solargraph/api_map/cache.rb +60 -20
- data/lib/solargraph/api_map/store.rb +47 -11
- data/lib/solargraph/api_map.rb +161 -95
- data/lib/solargraph/bench.rb +2 -2
- data/lib/solargraph/cache.rb +30 -6
- data/lib/solargraph/complex_type/type_methods.rb +54 -9
- data/lib/solargraph/complex_type/unique_type.rb +154 -57
- data/lib/solargraph/complex_type.rb +91 -17
- data/lib/solargraph/convention.rb +0 -3
- 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 +146 -0
- data/lib/solargraph/gem_pins.rb +64 -0
- data/lib/solargraph/language_server/host/cataloger.rb +1 -0
- data/lib/solargraph/language_server/host/diagnoser.rb +2 -2
- data/lib/solargraph/language_server/host/dispatch.rb +10 -4
- data/lib/solargraph/language_server/host/message_worker.rb +4 -0
- data/lib/solargraph/language_server/host/sources.rb +7 -4
- data/lib/solargraph/language_server/host.rb +26 -7
- 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 +11 -0
- data/lib/solargraph/language_server/message/initialized.rb +1 -0
- data/lib/solargraph/language_server/message/text_document/document_symbol.rb +4 -1
- data/lib/solargraph/language_server/message/text_document/formatting.rb +4 -4
- data/lib/solargraph/language_server/message/text_document/hover.rb +2 -0
- data/lib/solargraph/language_server/message/text_document/type_definition.rb +24 -0
- data/lib/solargraph/language_server/message/text_document.rb +1 -1
- data/lib/solargraph/language_server/message/workspace/did_change_configuration.rb +5 -0
- data/lib/solargraph/language_server/message.rb +1 -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/library.rb +86 -16
- data/lib/solargraph/location.rb +1 -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 +9 -0
- data/lib/solargraph/parser/{legacy → parser_gem}/class_methods.rb +31 -5
- data/lib/solargraph/parser/{legacy → parser_gem}/flawed_builder.rb +3 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_chainer.rb +57 -41
- data/lib/solargraph/parser/parser_gem/node_methods.rb +499 -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 +53 -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/{rubyvm → parser_gem}/node_processors/cvasgn_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/def_node.rb +1 -1
- data/lib/solargraph/parser/{legacy → parser_gem}/node_processors/defs_node.rb +2 -2
- data/lib/solargraph/parser/{rubyvm → 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 +2 -2
- 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 +2 -2
- data/lib/solargraph/parser/{rubyvm → parser_gem}/node_processors/sym_node.rb +1 -1
- data/lib/solargraph/parser/parser_gem/node_processors.rb +54 -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 +9 -10
- data/lib/solargraph/pin/base.rb +64 -9
- data/lib/solargraph/pin/base_variable.rb +6 -2
- data/lib/solargraph/pin/block.rb +19 -9
- data/lib/solargraph/pin/closure.rb +17 -2
- data/lib/solargraph/pin/common.rb +7 -3
- data/lib/solargraph/pin/conversions.rb +33 -3
- data/lib/solargraph/pin/delegated_method.rb +97 -0
- data/lib/solargraph/pin/documenting.rb +25 -34
- data/lib/solargraph/pin/instance_variable.rb +4 -0
- data/lib/solargraph/pin/local_variable.rb +13 -1
- data/lib/solargraph/pin/method.rb +182 -18
- data/lib/solargraph/pin/namespace.rb +18 -5
- data/lib/solargraph/pin/parameter.rb +44 -14
- data/lib/solargraph/pin/reference/override.rb +2 -2
- data/lib/solargraph/pin/reference.rb +8 -0
- data/lib/solargraph/pin/search.rb +4 -4
- data/lib/solargraph/pin/signature.rb +123 -3
- data/lib/solargraph/pin.rb +1 -1
- data/lib/solargraph/range.rb +4 -6
- data/lib/solargraph/rbs_map/conversions.rb +294 -50
- data/lib/solargraph/rbs_map/core_fills.rb +7 -24
- data/lib/solargraph/rbs_map/core_map.rb +3 -2
- data/lib/solargraph/rbs_map/core_signs.rb +2 -0
- data/lib/solargraph/rbs_map/stdlib_map.rb +2 -5
- data/lib/solargraph/rbs_map.rb +20 -11
- data/lib/solargraph/shell.rb +62 -59
- data/lib/solargraph/source/chain/array.rb +32 -0
- data/lib/solargraph/source/chain/block_symbol.rb +13 -0
- data/lib/solargraph/source/chain/call.rb +99 -46
- 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 +8 -2
- data/lib/solargraph/source/chain/or.rb +1 -1
- data/lib/solargraph/source/chain/z_super.rb +3 -3
- data/lib/solargraph/source/chain.rb +29 -14
- data/lib/solargraph/source/change.rb +3 -0
- data/lib/solargraph/source/cursor.rb +2 -0
- data/lib/solargraph/source/source_chainer.rb +8 -5
- data/lib/solargraph/source.rb +18 -19
- data/lib/solargraph/source_map/clip.rb +25 -23
- data/lib/solargraph/source_map/mapper.rb +12 -1
- data/lib/solargraph/source_map.rb +30 -7
- data/lib/solargraph/type_checker/checks.rb +10 -2
- data/lib/solargraph/type_checker.rb +123 -45
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/workspace/config.rb +14 -11
- data/lib/solargraph/workspace.rb +3 -2
- 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 +11 -1
- 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 -284
- data/lib/solargraph/yard_tags.rb +20 -0
- data/lib/solargraph/yardoc.rb +52 -0
- data/lib/solargraph.rb +6 -4
- data/solargraph.gemspec +11 -5
- metadata +131 -75
- data/lib/solargraph/api_map/bundler_methods.rb +0 -22
- data/lib/solargraph/convention/rspec.rb +0 -30
- data/lib/solargraph/documentor.rb +0 -76
- 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 -35
- data/lib/solargraph/parser/legacy/node_processors/begin_node.rb +0 -15
- data/lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb +0 -23
- data/lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb +0 -23
- data/lib/solargraph/parser/legacy/node_processors/sym_node.rb +0 -18
- data/lib/solargraph/parser/legacy/node_processors.rb +0 -54
- data/lib/solargraph/parser/legacy.rb +0 -12
- data/lib/solargraph/parser/rubyvm/class_methods.rb +0 -149
- data/lib/solargraph/parser/rubyvm/node_chainer.rb +0 -160
- data/lib/solargraph/parser/rubyvm/node_methods.rb +0 -315
- 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/def_node.rb +0 -75
- data/lib/solargraph/parser/rubyvm/node_processors/defs_node.rb +0 -68
- 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 -45
- 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 -63
- data/lib/solargraph/parser/rubyvm/node_wrapper.rb +0 -47
- data/lib/solargraph/parser/rubyvm.rb +0 -40
- data/lib/yard-solargraph.rb +0 -33
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.53.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fred Snyder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: backport
|
|
@@ -67,61 +67,89 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '1.4'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: jaro_winkler
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
|
-
- - "
|
|
73
|
+
- - "~>"
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version: '
|
|
75
|
+
version: '1.6'
|
|
76
76
|
type: :runtime
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
|
-
- - "
|
|
80
|
+
- - "~>"
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version: '
|
|
82
|
+
version: '1.6'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name:
|
|
84
|
+
name: kramdown
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '2.3'
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
94
|
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '2.3'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name: kramdown
|
|
98
|
+
name: kramdown-parser-gfm
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - "~>"
|
|
102
102
|
- !ruby/object:Gem::Version
|
|
103
|
-
version: '
|
|
103
|
+
version: '1.1'
|
|
104
104
|
type: :runtime
|
|
105
105
|
prerelease: false
|
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
|
107
107
|
requirements:
|
|
108
108
|
- - "~>"
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
|
-
version: '
|
|
110
|
+
version: '1.1'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: logger
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - "~>"
|
|
116
116
|
- !ruby/object:Gem::Version
|
|
117
|
-
version: '1.
|
|
117
|
+
version: '1.6'
|
|
118
118
|
type: :runtime
|
|
119
119
|
prerelease: false
|
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - "~>"
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
|
-
version: '1.
|
|
124
|
+
version: '1.6'
|
|
125
|
+
- !ruby/object:Gem::Dependency
|
|
126
|
+
name: observer
|
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
|
128
|
+
requirements:
|
|
129
|
+
- - "~>"
|
|
130
|
+
- !ruby/object:Gem::Version
|
|
131
|
+
version: '0.1'
|
|
132
|
+
type: :runtime
|
|
133
|
+
prerelease: false
|
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - "~>"
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0.1'
|
|
139
|
+
- !ruby/object:Gem::Dependency
|
|
140
|
+
name: ostruct
|
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
|
142
|
+
requirements:
|
|
143
|
+
- - "~>"
|
|
144
|
+
- !ruby/object:Gem::Version
|
|
145
|
+
version: '0.6'
|
|
146
|
+
type: :runtime
|
|
147
|
+
prerelease: false
|
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
149
|
+
requirements:
|
|
150
|
+
- - "~>"
|
|
151
|
+
- !ruby/object:Gem::Version
|
|
152
|
+
version: '0.6'
|
|
125
153
|
- !ruby/object:Gem::Dependency
|
|
126
154
|
name: parser
|
|
127
155
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -142,28 +170,34 @@ dependencies:
|
|
|
142
170
|
requirements:
|
|
143
171
|
- - "~>"
|
|
144
172
|
- !ruby/object:Gem::Version
|
|
145
|
-
version: '
|
|
173
|
+
version: '3.3'
|
|
146
174
|
type: :runtime
|
|
147
175
|
prerelease: false
|
|
148
176
|
version_requirements: !ruby/object:Gem::Requirement
|
|
149
177
|
requirements:
|
|
150
178
|
- - "~>"
|
|
151
179
|
- !ruby/object:Gem::Version
|
|
152
|
-
version: '
|
|
180
|
+
version: '3.3'
|
|
153
181
|
- !ruby/object:Gem::Dependency
|
|
154
182
|
name: reverse_markdown
|
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
|
156
184
|
requirements:
|
|
157
|
-
- - "
|
|
185
|
+
- - ">="
|
|
158
186
|
- !ruby/object:Gem::Version
|
|
159
187
|
version: '2.0'
|
|
188
|
+
- - "<"
|
|
189
|
+
- !ruby/object:Gem::Version
|
|
190
|
+
version: '4'
|
|
160
191
|
type: :runtime
|
|
161
192
|
prerelease: false
|
|
162
193
|
version_requirements: !ruby/object:Gem::Requirement
|
|
163
194
|
requirements:
|
|
164
|
-
- - "
|
|
195
|
+
- - ">="
|
|
165
196
|
- !ruby/object:Gem::Version
|
|
166
197
|
version: '2.0'
|
|
198
|
+
- - "<"
|
|
199
|
+
- !ruby/object:Gem::Version
|
|
200
|
+
version: '4'
|
|
167
201
|
- !ruby/object:Gem::Dependency
|
|
168
202
|
name: rubocop
|
|
169
203
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -226,6 +260,20 @@ dependencies:
|
|
|
226
260
|
- - ">="
|
|
227
261
|
- !ruby/object:Gem::Version
|
|
228
262
|
version: 0.9.24
|
|
263
|
+
- !ruby/object:Gem::Dependency
|
|
264
|
+
name: yard-solargraph
|
|
265
|
+
requirement: !ruby/object:Gem::Requirement
|
|
266
|
+
requirements:
|
|
267
|
+
- - "~>"
|
|
268
|
+
- !ruby/object:Gem::Version
|
|
269
|
+
version: '0.1'
|
|
270
|
+
type: :runtime
|
|
271
|
+
prerelease: false
|
|
272
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
273
|
+
requirements:
|
|
274
|
+
- - "~>"
|
|
275
|
+
- !ruby/object:Gem::Version
|
|
276
|
+
version: '0.1'
|
|
229
277
|
- !ruby/object:Gem::Dependency
|
|
230
278
|
name: pry
|
|
231
279
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -254,6 +302,20 @@ dependencies:
|
|
|
254
302
|
- - "~>"
|
|
255
303
|
- !ruby/object:Gem::Version
|
|
256
304
|
version: '3.1'
|
|
305
|
+
- !ruby/object:Gem::Dependency
|
|
306
|
+
name: rake
|
|
307
|
+
requirement: !ruby/object:Gem::Requirement
|
|
308
|
+
requirements:
|
|
309
|
+
- - "~>"
|
|
310
|
+
- !ruby/object:Gem::Version
|
|
311
|
+
version: '13.2'
|
|
312
|
+
type: :development
|
|
313
|
+
prerelease: false
|
|
314
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
315
|
+
requirements:
|
|
316
|
+
- - "~>"
|
|
317
|
+
- !ruby/object:Gem::Version
|
|
318
|
+
version: '13.2'
|
|
257
319
|
- !ruby/object:Gem::Dependency
|
|
258
320
|
name: rspec
|
|
259
321
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -296,6 +358,20 @@ dependencies:
|
|
|
296
358
|
- - "~>"
|
|
297
359
|
- !ruby/object:Gem::Version
|
|
298
360
|
version: '3.6'
|
|
361
|
+
- !ruby/object:Gem::Dependency
|
|
362
|
+
name: irb
|
|
363
|
+
requirement: !ruby/object:Gem::Requirement
|
|
364
|
+
requirements:
|
|
365
|
+
- - ">="
|
|
366
|
+
- !ruby/object:Gem::Version
|
|
367
|
+
version: '0'
|
|
368
|
+
type: :development
|
|
369
|
+
prerelease: false
|
|
370
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
371
|
+
requirements:
|
|
372
|
+
- - ">="
|
|
373
|
+
- !ruby/object:Gem::Version
|
|
374
|
+
version: '0'
|
|
299
375
|
description: IDE tools for code completion, inline documentation, and static analysis
|
|
300
376
|
email: admin@castwide.com
|
|
301
377
|
executables:
|
|
@@ -304,7 +380,9 @@ extensions: []
|
|
|
304
380
|
extra_rdoc_files: []
|
|
305
381
|
files:
|
|
306
382
|
- ".github/FUNDING.yml"
|
|
383
|
+
- ".github/workflows/plugins.yml"
|
|
307
384
|
- ".github/workflows/rspec.yml"
|
|
385
|
+
- ".github/workflows/typecheck.yml"
|
|
308
386
|
- ".gitignore"
|
|
309
387
|
- ".rspec"
|
|
310
388
|
- ".yardopts"
|
|
@@ -318,7 +396,6 @@ files:
|
|
|
318
396
|
- lib/.rubocop.yml
|
|
319
397
|
- lib/solargraph.rb
|
|
320
398
|
- lib/solargraph/api_map.rb
|
|
321
|
-
- lib/solargraph/api_map/bundler_methods.rb
|
|
322
399
|
- lib/solargraph/api_map/cache.rb
|
|
323
400
|
- lib/solargraph/api_map/source_to_yard.rb
|
|
324
401
|
- lib/solargraph/api_map/store.rb
|
|
@@ -332,7 +409,6 @@ files:
|
|
|
332
409
|
- lib/solargraph/convention/gemfile.rb
|
|
333
410
|
- lib/solargraph/convention/gemspec.rb
|
|
334
411
|
- lib/solargraph/convention/rakefile.rb
|
|
335
|
-
- lib/solargraph/convention/rspec.rb
|
|
336
412
|
- lib/solargraph/converters/dd.rb
|
|
337
413
|
- lib/solargraph/converters/dl.rb
|
|
338
414
|
- lib/solargraph/converters/dt.rb
|
|
@@ -345,8 +421,9 @@ files:
|
|
|
345
421
|
- lib/solargraph/diagnostics/severities.rb
|
|
346
422
|
- lib/solargraph/diagnostics/type_check.rb
|
|
347
423
|
- lib/solargraph/diagnostics/update_errors.rb
|
|
348
|
-
- lib/solargraph/
|
|
424
|
+
- lib/solargraph/doc_map.rb
|
|
349
425
|
- lib/solargraph/environ.rb
|
|
426
|
+
- lib/solargraph/gem_pins.rb
|
|
350
427
|
- lib/solargraph/language_server.rb
|
|
351
428
|
- lib/solargraph/language_server/completion_item_kinds.rb
|
|
352
429
|
- lib/solargraph/language_server/error_codes.rb
|
|
@@ -395,6 +472,7 @@ files:
|
|
|
395
472
|
- lib/solargraph/language_server/message/text_document/references.rb
|
|
396
473
|
- lib/solargraph/language_server/message/text_document/rename.rb
|
|
397
474
|
- lib/solargraph/language_server/message/text_document/signature_help.rb
|
|
475
|
+
- lib/solargraph/language_server/message/text_document/type_definition.rb
|
|
398
476
|
- lib/solargraph/language_server/message/workspace.rb
|
|
399
477
|
- lib/solargraph/language_server/message/workspace/did_change_configuration.rb
|
|
400
478
|
- lib/solargraph/language_server/message/workspace/did_change_watched_files.rb
|
|
@@ -413,60 +491,33 @@ files:
|
|
|
413
491
|
- lib/solargraph/page.rb
|
|
414
492
|
- lib/solargraph/parser.rb
|
|
415
493
|
- lib/solargraph/parser/comment_ripper.rb
|
|
416
|
-
- lib/solargraph/parser/legacy.rb
|
|
417
|
-
- lib/solargraph/parser/legacy/class_methods.rb
|
|
418
|
-
- lib/solargraph/parser/legacy/flawed_builder.rb
|
|
419
|
-
- lib/solargraph/parser/legacy/node_chainer.rb
|
|
420
|
-
- lib/solargraph/parser/legacy/node_methods.rb
|
|
421
|
-
- lib/solargraph/parser/legacy/node_processors.rb
|
|
422
|
-
- lib/solargraph/parser/legacy/node_processors/alias_node.rb
|
|
423
|
-
- lib/solargraph/parser/legacy/node_processors/args_node.rb
|
|
424
|
-
- lib/solargraph/parser/legacy/node_processors/begin_node.rb
|
|
425
|
-
- lib/solargraph/parser/legacy/node_processors/block_node.rb
|
|
426
|
-
- lib/solargraph/parser/legacy/node_processors/casgn_node.rb
|
|
427
|
-
- lib/solargraph/parser/legacy/node_processors/cvasgn_node.rb
|
|
428
|
-
- lib/solargraph/parser/legacy/node_processors/def_node.rb
|
|
429
|
-
- lib/solargraph/parser/legacy/node_processors/defs_node.rb
|
|
430
|
-
- lib/solargraph/parser/legacy/node_processors/gvasgn_node.rb
|
|
431
|
-
- lib/solargraph/parser/legacy/node_processors/ivasgn_node.rb
|
|
432
|
-
- lib/solargraph/parser/legacy/node_processors/lvasgn_node.rb
|
|
433
|
-
- lib/solargraph/parser/legacy/node_processors/namespace_node.rb
|
|
434
|
-
- lib/solargraph/parser/legacy/node_processors/orasgn_node.rb
|
|
435
|
-
- lib/solargraph/parser/legacy/node_processors/resbody_node.rb
|
|
436
|
-
- lib/solargraph/parser/legacy/node_processors/sclass_node.rb
|
|
437
|
-
- lib/solargraph/parser/legacy/node_processors/send_node.rb
|
|
438
|
-
- lib/solargraph/parser/legacy/node_processors/sym_node.rb
|
|
439
494
|
- lib/solargraph/parser/node_methods.rb
|
|
440
495
|
- lib/solargraph/parser/node_processor.rb
|
|
441
496
|
- lib/solargraph/parser/node_processor/base.rb
|
|
497
|
+
- lib/solargraph/parser/parser_gem.rb
|
|
498
|
+
- lib/solargraph/parser/parser_gem/class_methods.rb
|
|
499
|
+
- lib/solargraph/parser/parser_gem/flawed_builder.rb
|
|
500
|
+
- lib/solargraph/parser/parser_gem/node_chainer.rb
|
|
501
|
+
- lib/solargraph/parser/parser_gem/node_methods.rb
|
|
502
|
+
- lib/solargraph/parser/parser_gem/node_processors.rb
|
|
503
|
+
- lib/solargraph/parser/parser_gem/node_processors/alias_node.rb
|
|
504
|
+
- lib/solargraph/parser/parser_gem/node_processors/args_node.rb
|
|
505
|
+
- lib/solargraph/parser/parser_gem/node_processors/begin_node.rb
|
|
506
|
+
- lib/solargraph/parser/parser_gem/node_processors/block_node.rb
|
|
507
|
+
- lib/solargraph/parser/parser_gem/node_processors/casgn_node.rb
|
|
508
|
+
- lib/solargraph/parser/parser_gem/node_processors/cvasgn_node.rb
|
|
509
|
+
- lib/solargraph/parser/parser_gem/node_processors/def_node.rb
|
|
510
|
+
- lib/solargraph/parser/parser_gem/node_processors/defs_node.rb
|
|
511
|
+
- lib/solargraph/parser/parser_gem/node_processors/gvasgn_node.rb
|
|
512
|
+
- lib/solargraph/parser/parser_gem/node_processors/ivasgn_node.rb
|
|
513
|
+
- lib/solargraph/parser/parser_gem/node_processors/lvasgn_node.rb
|
|
514
|
+
- lib/solargraph/parser/parser_gem/node_processors/namespace_node.rb
|
|
515
|
+
- lib/solargraph/parser/parser_gem/node_processors/orasgn_node.rb
|
|
516
|
+
- lib/solargraph/parser/parser_gem/node_processors/resbody_node.rb
|
|
517
|
+
- lib/solargraph/parser/parser_gem/node_processors/sclass_node.rb
|
|
518
|
+
- lib/solargraph/parser/parser_gem/node_processors/send_node.rb
|
|
519
|
+
- lib/solargraph/parser/parser_gem/node_processors/sym_node.rb
|
|
442
520
|
- lib/solargraph/parser/region.rb
|
|
443
|
-
- lib/solargraph/parser/rubyvm.rb
|
|
444
|
-
- lib/solargraph/parser/rubyvm/class_methods.rb
|
|
445
|
-
- lib/solargraph/parser/rubyvm/node_chainer.rb
|
|
446
|
-
- lib/solargraph/parser/rubyvm/node_methods.rb
|
|
447
|
-
- lib/solargraph/parser/rubyvm/node_processors.rb
|
|
448
|
-
- lib/solargraph/parser/rubyvm/node_processors/alias_node.rb
|
|
449
|
-
- lib/solargraph/parser/rubyvm/node_processors/args_node.rb
|
|
450
|
-
- lib/solargraph/parser/rubyvm/node_processors/begin_node.rb
|
|
451
|
-
- lib/solargraph/parser/rubyvm/node_processors/block_node.rb
|
|
452
|
-
- lib/solargraph/parser/rubyvm/node_processors/casgn_node.rb
|
|
453
|
-
- lib/solargraph/parser/rubyvm/node_processors/cvasgn_node.rb
|
|
454
|
-
- lib/solargraph/parser/rubyvm/node_processors/def_node.rb
|
|
455
|
-
- lib/solargraph/parser/rubyvm/node_processors/defs_node.rb
|
|
456
|
-
- lib/solargraph/parser/rubyvm/node_processors/gvasgn_node.rb
|
|
457
|
-
- lib/solargraph/parser/rubyvm/node_processors/ivasgn_node.rb
|
|
458
|
-
- lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb
|
|
459
|
-
- lib/solargraph/parser/rubyvm/node_processors/lit_node.rb
|
|
460
|
-
- lib/solargraph/parser/rubyvm/node_processors/lvasgn_node.rb
|
|
461
|
-
- lib/solargraph/parser/rubyvm/node_processors/namespace_node.rb
|
|
462
|
-
- lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb
|
|
463
|
-
- lib/solargraph/parser/rubyvm/node_processors/orasgn_node.rb
|
|
464
|
-
- lib/solargraph/parser/rubyvm/node_processors/resbody_node.rb
|
|
465
|
-
- lib/solargraph/parser/rubyvm/node_processors/sclass_node.rb
|
|
466
|
-
- lib/solargraph/parser/rubyvm/node_processors/scope_node.rb
|
|
467
|
-
- lib/solargraph/parser/rubyvm/node_processors/send_node.rb
|
|
468
|
-
- lib/solargraph/parser/rubyvm/node_processors/sym_node.rb
|
|
469
|
-
- lib/solargraph/parser/rubyvm/node_wrapper.rb
|
|
470
521
|
- lib/solargraph/parser/snippet.rb
|
|
471
522
|
- lib/solargraph/pin.rb
|
|
472
523
|
- lib/solargraph/pin/base.rb
|
|
@@ -477,6 +528,7 @@ files:
|
|
|
477
528
|
- lib/solargraph/pin/common.rb
|
|
478
529
|
- lib/solargraph/pin/constant.rb
|
|
479
530
|
- lib/solargraph/pin/conversions.rb
|
|
531
|
+
- lib/solargraph/pin/delegated_method.rb
|
|
480
532
|
- lib/solargraph/pin/documenting.rb
|
|
481
533
|
- lib/solargraph/pin/duck_method.rb
|
|
482
534
|
- lib/solargraph/pin/global_variable.rb
|
|
@@ -512,6 +564,8 @@ files:
|
|
|
512
564
|
- lib/solargraph/shell.rb
|
|
513
565
|
- lib/solargraph/source.rb
|
|
514
566
|
- lib/solargraph/source/chain.rb
|
|
567
|
+
- lib/solargraph/source/chain/array.rb
|
|
568
|
+
- lib/solargraph/source/chain/block_symbol.rb
|
|
515
569
|
- lib/solargraph/source/chain/block_variable.rb
|
|
516
570
|
- lib/solargraph/source/chain/call.rb
|
|
517
571
|
- lib/solargraph/source/chain/class_variable.rb
|
|
@@ -519,6 +573,7 @@ files:
|
|
|
519
573
|
- lib/solargraph/source/chain/global_variable.rb
|
|
520
574
|
- lib/solargraph/source/chain/hash.rb
|
|
521
575
|
- lib/solargraph/source/chain/head.rb
|
|
576
|
+
- lib/solargraph/source/chain/if.rb
|
|
522
577
|
- lib/solargraph/source/chain/instance_variable.rb
|
|
523
578
|
- lib/solargraph/source/chain/link.rb
|
|
524
579
|
- lib/solargraph/source/chain/literal.rb
|
|
@@ -558,7 +613,8 @@ files:
|
|
|
558
613
|
- lib/solargraph/yard_map/mapper/to_method.rb
|
|
559
614
|
- lib/solargraph/yard_map/mapper/to_namespace.rb
|
|
560
615
|
- lib/solargraph/yard_map/to_method.rb
|
|
561
|
-
- lib/
|
|
616
|
+
- lib/solargraph/yard_tags.rb
|
|
617
|
+
- lib/solargraph/yardoc.rb
|
|
562
618
|
- solargraph.gemspec
|
|
563
619
|
homepage: https://solargraph.org
|
|
564
620
|
licenses:
|
|
@@ -576,7 +632,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
576
632
|
requirements:
|
|
577
633
|
- - ">="
|
|
578
634
|
- !ruby/object:Gem::Version
|
|
579
|
-
version: '
|
|
635
|
+
version: '3.0'
|
|
580
636
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
581
637
|
requirements:
|
|
582
638
|
- - ">="
|
|
@@ -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,30 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module Solargraph
|
|
4
|
-
module Convention
|
|
5
|
-
class Rspec < Base
|
|
6
|
-
def local source_map
|
|
7
|
-
return EMPTY_ENVIRON unless File.basename(source_map.filename) =~ /_spec\.rb$/
|
|
8
|
-
@environ ||= Environ.new(
|
|
9
|
-
requires: ['rspec'],
|
|
10
|
-
domains: ['RSpec::Matchers', 'RSpec::ExpectationGroups'],
|
|
11
|
-
pins: [
|
|
12
|
-
# This override is necessary due to an erroneous @return tag in
|
|
13
|
-
# rspec's YARD documentation.
|
|
14
|
-
# @todo The return types have been fixed (https://github.com/rspec/rspec-expectations/pull/1121)
|
|
15
|
-
Solargraph::Pin::Reference::Override.method_return('RSpec::Matchers#expect', 'RSpec::Expectations::ExpectationTarget')
|
|
16
|
-
].concat(extras)
|
|
17
|
-
)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
private
|
|
21
|
-
|
|
22
|
-
def extras
|
|
23
|
-
@@extras ||= SourceMap.load_string(%(
|
|
24
|
-
def describe(*args); end
|
|
25
|
-
def it(*args); end
|
|
26
|
-
)).pins
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
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
|