ruby_json_parser 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rubocop.yml +35 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE +21 -0
- data/README.md +143 -0
- data/Rakefile +12 -0
- data/lib/ruby_json_parser/ast.rb +312 -0
- data/lib/ruby_json_parser/evaluator.rb +81 -0
- data/lib/ruby_json_parser/lexer.rb +358 -0
- data/lib/ruby_json_parser/parser.rb +205 -0
- data/lib/ruby_json_parser/result.rb +43 -0
- data/lib/ruby_json_parser/token.rb +171 -0
- data/lib/ruby_json_parser/version.rb +6 -0
- data/lib/ruby_json_parser.rb +77 -0
- data/sorbet/config +4 -0
- data/sorbet/rbi/annotations/.gitattributes +1 -0
- data/sorbet/rbi/annotations/minitest.rbi +119 -0
- data/sorbet/rbi/annotations/rainbow.rbi +269 -0
- data/sorbet/rbi/gems/.gitattributes +1 -0
- data/sorbet/rbi/gems/ast@2.4.2.rbi +585 -0
- data/sorbet/rbi/gems/erubi@1.13.0.rbi +150 -0
- data/sorbet/rbi/gems/json@2.7.2.rbi +1562 -0
- data/sorbet/rbi/gems/language_server-protocol@3.17.0.3.rbi +14238 -0
- data/sorbet/rbi/gems/minitest@5.24.1.rbi +1563 -0
- data/sorbet/rbi/gems/netrc@0.11.0.rbi +159 -0
- data/sorbet/rbi/gems/parallel@1.25.1.rbi +287 -0
- data/sorbet/rbi/gems/parser@3.3.4.0.rbi +5519 -0
- data/sorbet/rbi/gems/prism@0.30.0.rbi +39212 -0
- data/sorbet/rbi/gems/racc@1.8.0.rbi +162 -0
- data/sorbet/rbi/gems/rainbow@3.1.1.rbi +403 -0
- data/sorbet/rbi/gems/rake@13.2.1.rbi +3028 -0
- data/sorbet/rbi/gems/rbi@0.1.13.rbi +3078 -0
- data/sorbet/rbi/gems/regexp_parser@2.9.2.rbi +3772 -0
- data/sorbet/rbi/gems/rexml@3.3.1.rbi +4813 -0
- data/sorbet/rbi/gems/rubocop-ast@1.31.3.rbi +7015 -0
- data/sorbet/rbi/gems/rubocop@1.65.0.rbi +58191 -0
- data/sorbet/rbi/gems/ruby-progressbar@1.13.0.rbi +1318 -0
- data/sorbet/rbi/gems/spoom@1.3.3.rbi +4926 -0
- data/sorbet/rbi/gems/strscan@3.1.0.rbi +9 -0
- data/sorbet/rbi/gems/tapioca@0.15.1.rbi +3566 -0
- data/sorbet/rbi/gems/thor@1.3.1.rbi +4352 -0
- data/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +66 -0
- data/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi +435 -0
- data/sorbet/rbi/gems/yard@0.9.36.rbi +18221 -0
- data/sorbet/tapioca/config.yml +13 -0
- data/sorbet/tapioca/require.rb +4 -0
- metadata +105 -0
@@ -0,0 +1,3566 @@
|
|
1
|
+
# typed: true
|
2
|
+
|
3
|
+
# DO NOT EDIT MANUALLY
|
4
|
+
# This is an autogenerated file for types exported from the `tapioca` gem.
|
5
|
+
# Please instead update this file by running `bin/tapioca gem tapioca`.
|
6
|
+
|
7
|
+
|
8
|
+
class Bundler::Dependency < ::Gem::Dependency
|
9
|
+
include ::Tapioca::BundlerExt::AutoRequireHook
|
10
|
+
end
|
11
|
+
|
12
|
+
# source://tapioca//lib/tapioca/helpers/git_attributes.rb#4
|
13
|
+
class GitAttributes
|
14
|
+
class << self
|
15
|
+
# source://tapioca//lib/tapioca/helpers/git_attributes.rb#9
|
16
|
+
sig { params(path: ::Pathname).void }
|
17
|
+
def create_generated_attribute_file(path); end
|
18
|
+
|
19
|
+
# source://tapioca//lib/tapioca/helpers/git_attributes.rb#16
|
20
|
+
sig { params(path: ::Pathname).void }
|
21
|
+
def create_vendored_attribute_file(path); end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
# source://tapioca//lib/tapioca/helpers/git_attributes.rb#25
|
26
|
+
sig { params(path: ::Pathname, content: ::String).void }
|
27
|
+
def create_gitattributes_file(path, content); end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
# We need to do the alias-method-chain dance since Bootsnap does the same,
|
32
|
+
# and prepended modules and alias-method-chain don't play well together.
|
33
|
+
#
|
34
|
+
# So, why does Bootsnap do alias-method-chain and not prepend? Glad you asked!
|
35
|
+
# That's because RubyGems does alias-method-chain for Kernel#require and such,
|
36
|
+
# so, if Bootsnap were to do prepend, it might end up breaking RubyGems.
|
37
|
+
#
|
38
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#68
|
39
|
+
class Module
|
40
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#101
|
41
|
+
def append_features(constant); end
|
42
|
+
|
43
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#71
|
44
|
+
def autoload(const_name, path); end
|
45
|
+
|
46
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#111
|
47
|
+
def extend_object(obj); end
|
48
|
+
|
49
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#91
|
50
|
+
def prepend_features(constant); end
|
51
|
+
end
|
52
|
+
|
53
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#4
|
54
|
+
module RBI; end
|
55
|
+
|
56
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#5
|
57
|
+
class RBI::Tree < ::RBI::NodeWithComments
|
58
|
+
# source://rbi/0.1.13/lib/rbi/model.rb#119
|
59
|
+
sig do
|
60
|
+
params(
|
61
|
+
loc: T.nilable(::RBI::Loc),
|
62
|
+
comments: T::Array[::RBI::Comment],
|
63
|
+
block: T.nilable(T.proc.params(node: ::RBI::Tree).void)
|
64
|
+
).void
|
65
|
+
end
|
66
|
+
def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end
|
67
|
+
|
68
|
+
# source://rbi/0.1.13/lib/rbi/model.rb#126
|
69
|
+
sig { params(node: ::RBI::Node).void }
|
70
|
+
def <<(node); end
|
71
|
+
|
72
|
+
# source://rbi/0.1.13/lib/rbi/printer.rb#226
|
73
|
+
sig { override.params(v: ::RBI::Printer).void }
|
74
|
+
def accept_printer(v); end
|
75
|
+
|
76
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/add_sig_templates.rb#66
|
77
|
+
sig { params(with_todo_comment: T::Boolean).void }
|
78
|
+
def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end
|
79
|
+
|
80
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/annotate.rb#49
|
81
|
+
sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void }
|
82
|
+
def annotate!(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end
|
83
|
+
|
84
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#38
|
85
|
+
sig do
|
86
|
+
params(
|
87
|
+
name: ::String,
|
88
|
+
superclass_name: T.nilable(::String),
|
89
|
+
block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)
|
90
|
+
).returns(::RBI::Scope)
|
91
|
+
end
|
92
|
+
def create_class(name, superclass_name: T.unsafe(nil), &block); end
|
93
|
+
|
94
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#45
|
95
|
+
sig { params(name: ::String, value: ::String).void }
|
96
|
+
def create_constant(name, value:); end
|
97
|
+
|
98
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#55
|
99
|
+
sig { params(name: ::String).void }
|
100
|
+
def create_extend(name); end
|
101
|
+
|
102
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#50
|
103
|
+
sig { params(name: ::String).void }
|
104
|
+
def create_include(name); end
|
105
|
+
|
106
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#89
|
107
|
+
sig do
|
108
|
+
params(
|
109
|
+
name: ::String,
|
110
|
+
parameters: T::Array[::RBI::TypedParam],
|
111
|
+
return_type: ::String,
|
112
|
+
class_method: T::Boolean,
|
113
|
+
visibility: ::RBI::Visibility,
|
114
|
+
comments: T::Array[::RBI::Comment]
|
115
|
+
).void
|
116
|
+
end
|
117
|
+
def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
|
118
|
+
|
119
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#113
|
120
|
+
sig do
|
121
|
+
params(
|
122
|
+
name: ::String,
|
123
|
+
sigs: T::Array[::RBI::Sig],
|
124
|
+
parameters: T::Array[::RBI::Param],
|
125
|
+
class_method: T::Boolean,
|
126
|
+
visibility: ::RBI::Visibility,
|
127
|
+
comments: T::Array[::RBI::Comment]
|
128
|
+
).void
|
129
|
+
end
|
130
|
+
def create_method_with_sigs(name, sigs:, parameters: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end
|
131
|
+
|
132
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#60
|
133
|
+
sig { params(name: ::String).void }
|
134
|
+
def create_mixes_in_class_methods(name); end
|
135
|
+
|
136
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#25
|
137
|
+
sig { params(name: ::String, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
138
|
+
def create_module(name, &block); end
|
139
|
+
|
140
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#9
|
141
|
+
sig { params(constant: ::Module, block: T.nilable(T.proc.params(scope: ::RBI::Scope).void)).returns(::RBI::Scope) }
|
142
|
+
def create_path(constant, &block); end
|
143
|
+
|
144
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#135
|
145
|
+
sig do
|
146
|
+
params(
|
147
|
+
parameters: T::Hash[T.any(::String, ::Symbol), ::String],
|
148
|
+
type_parameters: T::Array[::String],
|
149
|
+
return_type: ::String
|
150
|
+
).returns(::RBI::Sig)
|
151
|
+
end
|
152
|
+
def create_sig(parameters:, type_parameters: T.unsafe(nil), return_type: T.unsafe(nil)); end
|
153
|
+
|
154
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#74
|
155
|
+
sig do
|
156
|
+
params(
|
157
|
+
name: ::String,
|
158
|
+
type: ::String,
|
159
|
+
variance: ::Symbol,
|
160
|
+
fixed: T.nilable(::String),
|
161
|
+
upper: T.nilable(::String),
|
162
|
+
lower: T.nilable(::String)
|
163
|
+
).void
|
164
|
+
end
|
165
|
+
def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end
|
166
|
+
|
167
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/deannotate.rb#41
|
168
|
+
sig { params(annotation: ::String).void }
|
169
|
+
def deannotate!(annotation); end
|
170
|
+
|
171
|
+
# source://rbi/0.1.13/lib/rbi/model.rb#132
|
172
|
+
sig { returns(T::Boolean) }
|
173
|
+
def empty?; end
|
174
|
+
|
175
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/filter_versions.rb#118
|
176
|
+
sig { params(version: ::Gem::Version).void }
|
177
|
+
def filter_versions!(version); end
|
178
|
+
|
179
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/group_nodes.rb#38
|
180
|
+
sig { void }
|
181
|
+
def group_nodes!; end
|
182
|
+
|
183
|
+
# source://rbi/0.1.13/lib/rbi/index.rb#68
|
184
|
+
sig { returns(::RBI::Index) }
|
185
|
+
def index; end
|
186
|
+
|
187
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/merge_trees.rb#324
|
188
|
+
sig do
|
189
|
+
params(
|
190
|
+
other: ::RBI::Tree,
|
191
|
+
left_name: ::String,
|
192
|
+
right_name: ::String,
|
193
|
+
keep: ::RBI::Rewriters::Merge::Keep
|
194
|
+
).returns(::RBI::MergeTree)
|
195
|
+
end
|
196
|
+
def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end
|
197
|
+
|
198
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/nest_non_public_methods.rb#46
|
199
|
+
sig { void }
|
200
|
+
def nest_non_public_methods!; end
|
201
|
+
|
202
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/nest_singleton_methods.rb#36
|
203
|
+
sig { void }
|
204
|
+
def nest_singleton_methods!; end
|
205
|
+
|
206
|
+
# source://rbi/0.1.13/lib/rbi/model.rb#110
|
207
|
+
sig { returns(T::Array[::RBI::Node]) }
|
208
|
+
def nodes; end
|
209
|
+
|
210
|
+
# source://rbi/0.1.13/lib/rbi/printer.rb#233
|
211
|
+
sig { override.returns(T::Boolean) }
|
212
|
+
def oneline?; end
|
213
|
+
|
214
|
+
# source://rbi/0.1.13/lib/rbi/rewriters/sort_nodes.rb#119
|
215
|
+
sig { void }
|
216
|
+
def sort_nodes!; end
|
217
|
+
|
218
|
+
private
|
219
|
+
|
220
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#150
|
221
|
+
sig { params(node: ::RBI::Node).returns(::RBI::Node) }
|
222
|
+
def create_node(node); end
|
223
|
+
|
224
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#145
|
225
|
+
sig { returns(T::Hash[::String, ::RBI::Node]) }
|
226
|
+
def nodes_cache; end
|
227
|
+
end
|
228
|
+
|
229
|
+
# source://tapioca//lib/tapioca/rbi_ext/model.rb#160
|
230
|
+
class RBI::TypedParam < ::T::Struct
|
231
|
+
const :param, ::RBI::Param
|
232
|
+
const :type, ::String
|
233
|
+
|
234
|
+
class << self
|
235
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
236
|
+
def inherited(s); end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#5
|
241
|
+
module T::Generic
|
242
|
+
include ::Kernel
|
243
|
+
|
244
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13
|
245
|
+
def [](*types); end
|
246
|
+
|
247
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47
|
248
|
+
def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end
|
249
|
+
|
250
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21
|
251
|
+
def type_member(variance = T.unsafe(nil), &bounds_proc); end
|
252
|
+
|
253
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34
|
254
|
+
def type_template(variance = T.unsafe(nil), &bounds_proc); end
|
255
|
+
end
|
256
|
+
|
257
|
+
# This module intercepts calls to generic type instantiations and type variable definitions.
|
258
|
+
# Tapioca stores the data from those calls in a `GenericTypeRegistry` which can then be used
|
259
|
+
# to look up the original call details when we are trying to do code generation.
|
260
|
+
#
|
261
|
+
# We are interested in the data of the `[]`, `type_member` and `type_template` calls which
|
262
|
+
# are all needed to generate good generic information at runtime.
|
263
|
+
#
|
264
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#12
|
265
|
+
module T::Generic::TypeStoragePatch
|
266
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#13
|
267
|
+
def [](*types); end
|
268
|
+
|
269
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#47
|
270
|
+
def has_attached_class!(variance = T.unsafe(nil), &bounds_proc); end
|
271
|
+
|
272
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#21
|
273
|
+
def type_member(variance = T.unsafe(nil), &bounds_proc); end
|
274
|
+
|
275
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#34
|
276
|
+
def type_template(variance = T.unsafe(nil), &bounds_proc); end
|
277
|
+
end
|
278
|
+
|
279
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#28
|
280
|
+
module T::Private::Methods
|
281
|
+
class << self
|
282
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30
|
283
|
+
def finalize_proc(decl); end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
|
287
|
+
class T::Private::Methods::Declaration < ::Struct
|
288
|
+
def bind; end
|
289
|
+
def bind=(_); end
|
290
|
+
def checked; end
|
291
|
+
def checked=(_); end
|
292
|
+
def finalized; end
|
293
|
+
def finalized=(_); end
|
294
|
+
def mod; end
|
295
|
+
def mod=(_); end
|
296
|
+
def mode; end
|
297
|
+
def mode=(_); end
|
298
|
+
def on_failure; end
|
299
|
+
def on_failure=(_); end
|
300
|
+
def override_allow_incompatible; end
|
301
|
+
def override_allow_incompatible=(_); end
|
302
|
+
def params; end
|
303
|
+
def params=(_); end
|
304
|
+
def raw; end
|
305
|
+
def raw=(_); end
|
306
|
+
def returns; end
|
307
|
+
def returns=(_); end
|
308
|
+
def type_parameters; end
|
309
|
+
def type_parameters=(_); end
|
310
|
+
|
311
|
+
class << self
|
312
|
+
def [](*_arg0); end
|
313
|
+
def inspect; end
|
314
|
+
def keyword_init?; end
|
315
|
+
def members; end
|
316
|
+
def new(*_arg0); end
|
317
|
+
end
|
318
|
+
end
|
319
|
+
|
320
|
+
class T::Private::Methods::DeclarationBlock < ::Struct
|
321
|
+
def blk; end
|
322
|
+
def blk=(_); end
|
323
|
+
def final; end
|
324
|
+
def final=(_); end
|
325
|
+
def loc; end
|
326
|
+
def loc=(_); end
|
327
|
+
def mod; end
|
328
|
+
def mod=(_); end
|
329
|
+
def raw; end
|
330
|
+
def raw=(_); end
|
331
|
+
|
332
|
+
class << self
|
333
|
+
def [](*_arg0); end
|
334
|
+
def inspect; end
|
335
|
+
def keyword_init?; end
|
336
|
+
def members; end
|
337
|
+
def new(*_arg0); end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#29
|
342
|
+
module T::Private::Methods::ProcBindPatch
|
343
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#30
|
344
|
+
def finalize_proc(decl); end
|
345
|
+
end
|
346
|
+
|
347
|
+
class T::Types::Proc < ::T::Types::Base; end
|
348
|
+
|
349
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#6
|
350
|
+
module T::Types::ProcBindPatch
|
351
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#7
|
352
|
+
def initialize(arg_types, returns, bind = T.unsafe(nil)); end
|
353
|
+
|
354
|
+
# source://tapioca//lib/tapioca/sorbet_ext/proc_bind_patch.rb#15
|
355
|
+
def name; end
|
356
|
+
end
|
357
|
+
|
358
|
+
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#6
|
359
|
+
class T::Types::Simple < ::T::Types::Base
|
360
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70
|
361
|
+
def name; end
|
362
|
+
end
|
363
|
+
|
364
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#65
|
365
|
+
module T::Types::Simple::GenericPatch
|
366
|
+
# This method intercepts calls to the `name` method for simple types, so that
|
367
|
+
# it can ask the name to the type if the type is generic, since, by this point,
|
368
|
+
# we've created a clone of that type with the `name` method returning the
|
369
|
+
# appropriate name for that specific concrete type.
|
370
|
+
#
|
371
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#70
|
372
|
+
def name; end
|
373
|
+
end
|
374
|
+
|
375
|
+
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#7
|
376
|
+
module T::Types::Simple::NamePatch
|
377
|
+
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#10
|
378
|
+
def name; end
|
379
|
+
|
380
|
+
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#16
|
381
|
+
def qualified_name_of(constant); end
|
382
|
+
end
|
383
|
+
|
384
|
+
# source://tapioca//lib/tapioca/sorbet_ext/name_patch.rb#8
|
385
|
+
T::Types::Simple::NamePatch::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
386
|
+
|
387
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#87
|
388
|
+
module T::Utils::Private
|
389
|
+
class << self
|
390
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89
|
391
|
+
def coerce_and_check_module_types(val, check_val, check_module_type); end
|
392
|
+
end
|
393
|
+
end
|
394
|
+
|
395
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#88
|
396
|
+
module T::Utils::Private::PrivateCoercePatch
|
397
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#89
|
398
|
+
def coerce_and_check_module_types(val, check_val, check_module_type); end
|
399
|
+
end
|
400
|
+
|
401
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4
|
402
|
+
module Tapioca
|
403
|
+
class << self
|
404
|
+
# source://tapioca//lib/tapioca.rb#20
|
405
|
+
sig do
|
406
|
+
type_parameters(:Result)
|
407
|
+
.params(
|
408
|
+
blk: T.proc.returns(T.type_parameter(:Result))
|
409
|
+
).returns(T.type_parameter(:Result))
|
410
|
+
end
|
411
|
+
def silence_warnings(&blk); end
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
# source://tapioca//lib/tapioca.rb#38
|
416
|
+
Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String)
|
417
|
+
|
418
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5
|
419
|
+
module Tapioca::BundlerExt; end
|
420
|
+
|
421
|
+
# This is a module that gets prepended to `Bundler::Dependency` and
|
422
|
+
# makes sure even gems marked as `require: false` are required during
|
423
|
+
# `Bundler.require`.
|
424
|
+
#
|
425
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#9
|
426
|
+
module Tapioca::BundlerExt::AutoRequireHook
|
427
|
+
requires_ancestor { Bundler::Dependency }
|
428
|
+
|
429
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#46
|
430
|
+
sig { returns(T.untyped) }
|
431
|
+
def autorequire; end
|
432
|
+
|
433
|
+
class << self
|
434
|
+
# @return [Boolean]
|
435
|
+
#
|
436
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#26
|
437
|
+
def enabled?; end
|
438
|
+
|
439
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#22
|
440
|
+
sig { params(name: T.untyped).returns(T::Boolean) }
|
441
|
+
def excluded?(name); end
|
442
|
+
|
443
|
+
# source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#36
|
444
|
+
sig do
|
445
|
+
type_parameters(:Result)
|
446
|
+
.params(
|
447
|
+
exclude: T::Array[::String],
|
448
|
+
blk: T.proc.returns(T.type_parameter(:Result))
|
449
|
+
).returns(T.type_parameter(:Result))
|
450
|
+
end
|
451
|
+
def override_require_false(exclude:, &blk); end
|
452
|
+
end
|
453
|
+
end
|
454
|
+
|
455
|
+
# source://tapioca//lib/tapioca.rb#61
|
456
|
+
Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
|
457
|
+
|
458
|
+
# source://tapioca//lib/tapioca.rb#60
|
459
|
+
Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String)
|
460
|
+
|
461
|
+
# source://tapioca//lib/tapioca.rb#59
|
462
|
+
Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String)
|
463
|
+
|
464
|
+
# source://tapioca//lib/tapioca/cli.rb#5
|
465
|
+
class Tapioca::Cli < ::Thor
|
466
|
+
include ::Tapioca::CliHelper
|
467
|
+
include ::Tapioca::ConfigHelper
|
468
|
+
include ::Tapioca::EnvHelper
|
469
|
+
|
470
|
+
# source://tapioca//lib/tapioca/cli.rb#366
|
471
|
+
def __print_version; end
|
472
|
+
|
473
|
+
# source://tapioca//lib/tapioca/cli.rb#348
|
474
|
+
def annotations; end
|
475
|
+
|
476
|
+
# source://tapioca//lib/tapioca/cli.rb#320
|
477
|
+
def check_shims; end
|
478
|
+
|
479
|
+
# source://tapioca//lib/tapioca/cli.rb#46
|
480
|
+
def configure; end
|
481
|
+
|
482
|
+
# source://tapioca//lib/tapioca/cli.rb#147
|
483
|
+
def dsl(*constant_or_paths); end
|
484
|
+
|
485
|
+
# @raise [MalformattedArgumentError]
|
486
|
+
#
|
487
|
+
# source://tapioca//lib/tapioca/cli.rb#264
|
488
|
+
def gem(*gems); end
|
489
|
+
|
490
|
+
# source://tapioca//lib/tapioca/cli.rb#27
|
491
|
+
def init; end
|
492
|
+
|
493
|
+
# source://tapioca//lib/tapioca/cli.rb#57
|
494
|
+
def require; end
|
495
|
+
|
496
|
+
# source://tapioca//lib/tapioca/cli.rb#74
|
497
|
+
def todo; end
|
498
|
+
|
499
|
+
private
|
500
|
+
|
501
|
+
# source://tapioca//lib/tapioca/cli.rb#380
|
502
|
+
def print_init_next_steps; end
|
503
|
+
|
504
|
+
class << self
|
505
|
+
# source://tapioca//lib/tapioca/cli.rb#372
|
506
|
+
def exit_on_failure?; end
|
507
|
+
end
|
508
|
+
end
|
509
|
+
|
510
|
+
# source://tapioca//lib/tapioca/cli.rb#10
|
511
|
+
Tapioca::Cli::FILE_HEADER_OPTION_DESC = T.let(T.unsafe(nil), String)
|
512
|
+
|
513
|
+
# source://tapioca//lib/tapioca/helpers/cli_helper.rb#5
|
514
|
+
module Tapioca::CliHelper
|
515
|
+
requires_ancestor { Thor::Shell }
|
516
|
+
|
517
|
+
# source://tapioca//lib/tapioca/helpers/cli_helper.rb#33
|
518
|
+
sig { params(options: T::Hash[::Symbol, T.untyped]).returns(T.nilable(::String)) }
|
519
|
+
def netrc_file(options); end
|
520
|
+
|
521
|
+
# source://tapioca//lib/tapioca/helpers/cli_helper.rb#26
|
522
|
+
sig { params(options: T::Hash[::Symbol, T.untyped]).returns(::Tapioca::RBIFormatter) }
|
523
|
+
def rbi_formatter(options); end
|
524
|
+
|
525
|
+
# source://tapioca//lib/tapioca/helpers/cli_helper.rb#12
|
526
|
+
sig { params(message: ::String, color: T.any(::Symbol, T::Array[::Symbol])).void }
|
527
|
+
def say_error(message = T.unsafe(nil), *color); end
|
528
|
+
end
|
529
|
+
|
530
|
+
# source://tapioca//lib/tapioca/commands.rb#5
|
531
|
+
module Tapioca::Commands; end
|
532
|
+
|
533
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
534
|
+
#
|
535
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#6
|
536
|
+
class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracker
|
537
|
+
include ::Tapioca::SorbetHelper
|
538
|
+
include ::Tapioca::RBIFilesHelper
|
539
|
+
|
540
|
+
abstract!
|
541
|
+
|
542
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#33
|
543
|
+
sig do
|
544
|
+
params(
|
545
|
+
requested_constants: T::Array[::String],
|
546
|
+
requested_paths: T::Array[::Pathname],
|
547
|
+
outpath: ::Pathname,
|
548
|
+
only: T::Array[::String],
|
549
|
+
exclude: T::Array[::String],
|
550
|
+
file_header: T::Boolean,
|
551
|
+
tapioca_path: ::String,
|
552
|
+
skip_constant: T::Array[::String],
|
553
|
+
quiet: T::Boolean,
|
554
|
+
verbose: T::Boolean,
|
555
|
+
number_of_workers: T.nilable(::Integer),
|
556
|
+
auto_strictness: T::Boolean,
|
557
|
+
gem_dir: ::String,
|
558
|
+
rbi_formatter: ::Tapioca::RBIFormatter,
|
559
|
+
app_root: ::String,
|
560
|
+
halt_upon_load_error: T::Boolean,
|
561
|
+
compiler_options: T::Hash[::String, T.untyped]
|
562
|
+
).void
|
563
|
+
end
|
564
|
+
def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil)); end
|
565
|
+
|
566
|
+
private
|
567
|
+
|
568
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#100
|
569
|
+
sig { returns(T::Array[::String]) }
|
570
|
+
def all_requested_constants; end
|
571
|
+
|
572
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293
|
573
|
+
sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
|
574
|
+
def build_error_for_files(cause, files); end
|
575
|
+
|
576
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#217
|
577
|
+
sig do
|
578
|
+
params(
|
579
|
+
constant_name: ::String,
|
580
|
+
rbi: ::RBI::File,
|
581
|
+
outpath: ::Pathname,
|
582
|
+
quiet: T::Boolean
|
583
|
+
).returns(T.nilable(::Pathname))
|
584
|
+
end
|
585
|
+
def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end
|
586
|
+
|
587
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#154
|
588
|
+
sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) }
|
589
|
+
def constantize(constant_names, ignore_missing: T.unsafe(nil)); end
|
590
|
+
|
591
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#177
|
592
|
+
sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
|
593
|
+
def constantize_compilers(compiler_names); end
|
594
|
+
|
595
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#353
|
596
|
+
sig { returns(T::Array[::String]) }
|
597
|
+
def constants_from_requested_paths; end
|
598
|
+
|
599
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#123
|
600
|
+
sig { returns(::Tapioca::Dsl::Pipeline) }
|
601
|
+
def create_pipeline; end
|
602
|
+
|
603
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#256
|
604
|
+
sig { params(constant_name: ::String).returns(::Pathname) }
|
605
|
+
def dsl_rbi_filename(constant_name); end
|
606
|
+
|
607
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#140
|
608
|
+
sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) }
|
609
|
+
def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end
|
610
|
+
|
611
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#348
|
612
|
+
sig { params(constant: ::String).returns(::String) }
|
613
|
+
def generate_command_for(constant); end
|
614
|
+
|
615
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#76
|
616
|
+
sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) }
|
617
|
+
def generate_dsl_rbi_files(outpath, quiet:); end
|
618
|
+
|
619
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#113
|
620
|
+
sig { void }
|
621
|
+
def load_application; end
|
622
|
+
|
623
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235
|
624
|
+
sig { params(dir: ::Pathname).void }
|
625
|
+
def perform_dsl_verification(dir); end
|
626
|
+
|
627
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#108
|
628
|
+
sig { returns(::Tapioca::Dsl::Pipeline) }
|
629
|
+
def pipeline; end
|
630
|
+
|
631
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#244
|
632
|
+
sig { params(files: T::Set[::Pathname]).void }
|
633
|
+
def purge_stale_dsl_rbi_files(files); end
|
634
|
+
|
635
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#343
|
636
|
+
sig { params(constant: ::String).returns(::String) }
|
637
|
+
def rbi_filename_for(constant); end
|
638
|
+
|
639
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#324
|
640
|
+
sig { params(path: ::Pathname).returns(T::Array[::Pathname]) }
|
641
|
+
def rbi_files_in(path); end
|
642
|
+
|
643
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#302
|
644
|
+
sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
|
645
|
+
def report_diff_and_exit_if_out_of_date(diff, command); end
|
646
|
+
|
647
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#197
|
648
|
+
sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) }
|
649
|
+
def resolve(name); end
|
650
|
+
|
651
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#331
|
652
|
+
sig { params(class_name: ::String).returns(::String) }
|
653
|
+
def underscore(class_name); end
|
654
|
+
|
655
|
+
# source://tapioca//lib/tapioca/commands/abstract_dsl.rb#261
|
656
|
+
sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) }
|
657
|
+
def verify_dsl_rbi(tmp_dir:); end
|
658
|
+
end
|
659
|
+
|
660
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
661
|
+
#
|
662
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#6
|
663
|
+
class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command
|
664
|
+
include ::Tapioca::SorbetHelper
|
665
|
+
include ::Tapioca::RBIFilesHelper
|
666
|
+
|
667
|
+
abstract!
|
668
|
+
|
669
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#32
|
670
|
+
sig do
|
671
|
+
params(
|
672
|
+
gem_names: T::Array[::String],
|
673
|
+
exclude: T::Array[::String],
|
674
|
+
include_dependencies: T::Boolean,
|
675
|
+
prerequire: T.nilable(::String),
|
676
|
+
postrequire: ::String,
|
677
|
+
typed_overrides: T::Hash[::String, ::String],
|
678
|
+
outpath: ::Pathname,
|
679
|
+
file_header: T::Boolean,
|
680
|
+
include_doc: T::Boolean,
|
681
|
+
include_loc: T::Boolean,
|
682
|
+
include_exported_rbis: T::Boolean,
|
683
|
+
number_of_workers: T.nilable(::Integer),
|
684
|
+
auto_strictness: T::Boolean,
|
685
|
+
dsl_dir: ::String,
|
686
|
+
rbi_formatter: ::Tapioca::RBIFormatter,
|
687
|
+
halt_upon_load_error: T::Boolean
|
688
|
+
).void
|
689
|
+
end
|
690
|
+
def initialize(gem_names:, exclude:, include_dependencies:, prerequire:, postrequire:, typed_overrides:, outpath:, file_header:, include_doc:, include_loc:, include_exported_rbis:, number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), dsl_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
|
691
|
+
|
692
|
+
private
|
693
|
+
|
694
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#223
|
695
|
+
sig { returns(T::Array[::String]) }
|
696
|
+
def added_rbis; end
|
697
|
+
|
698
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#284
|
699
|
+
sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) }
|
700
|
+
def build_error_for_files(cause, files); end
|
701
|
+
|
702
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#110
|
703
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec).void }
|
704
|
+
def compile_gem_rbi(gem); end
|
705
|
+
|
706
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#218
|
707
|
+
sig { params(gem_name: ::String).returns(::Pathname) }
|
708
|
+
def existing_rbi(gem_name); end
|
709
|
+
|
710
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#266
|
711
|
+
sig { returns(T::Hash[::String, ::String]) }
|
712
|
+
def existing_rbis; end
|
713
|
+
|
714
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#230
|
715
|
+
sig { params(gem_name: ::String).returns(::Pathname) }
|
716
|
+
def expected_rbi(gem_name); end
|
717
|
+
|
718
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#272
|
719
|
+
sig { returns(T::Hash[::String, ::String]) }
|
720
|
+
def expected_rbis; end
|
721
|
+
|
722
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#98
|
723
|
+
sig do
|
724
|
+
params(
|
725
|
+
gem: ::Tapioca::Gemfile::GemSpec,
|
726
|
+
dependencies: T::Array[::Tapioca::Gemfile::GemSpec]
|
727
|
+
).returns(T::Array[::Tapioca::Gemfile::GemSpec])
|
728
|
+
end
|
729
|
+
def gem_dependencies(gem, dependencies = T.unsafe(nil)); end
|
730
|
+
|
731
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#235
|
732
|
+
sig { params(gem_name: ::String).returns(T::Boolean) }
|
733
|
+
def gem_rbi_exists?(gem_name); end
|
734
|
+
|
735
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#279
|
736
|
+
sig { params(gem_name: ::String, version: ::String).returns(::Pathname) }
|
737
|
+
def gem_rbi_filename(gem_name, version); end
|
738
|
+
|
739
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#77
|
740
|
+
sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
|
741
|
+
def gems_to_generate(gem_names); end
|
742
|
+
|
743
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#289
|
744
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void }
|
745
|
+
def merge_with_exported_rbi(gem, file); end
|
746
|
+
|
747
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#260
|
748
|
+
sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void }
|
749
|
+
def move(old_filename, new_filename); end
|
750
|
+
|
751
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#170
|
752
|
+
sig { void }
|
753
|
+
def perform_additions; end
|
754
|
+
|
755
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#143
|
756
|
+
sig { void }
|
757
|
+
def perform_removals; end
|
758
|
+
|
759
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#213
|
760
|
+
sig { returns(T::Array[::String]) }
|
761
|
+
def removed_rbis; end
|
762
|
+
|
763
|
+
# source://tapioca//lib/tapioca/commands/abstract_gem.rb#240
|
764
|
+
sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void }
|
765
|
+
def report_diff_and_exit_if_out_of_date(diff, command); end
|
766
|
+
end
|
767
|
+
|
768
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#6
|
769
|
+
class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracker
|
770
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#18
|
771
|
+
sig do
|
772
|
+
params(
|
773
|
+
central_repo_root_uris: T::Array[::String],
|
774
|
+
auth: T.nilable(::String),
|
775
|
+
netrc_file: T.nilable(::String),
|
776
|
+
central_repo_index_path: ::String,
|
777
|
+
typed_overrides: T::Hash[::String, ::String]
|
778
|
+
).void
|
779
|
+
end
|
780
|
+
def initialize(central_repo_root_uris:, auth: T.unsafe(nil), netrc_file: T.unsafe(nil), central_repo_index_path: T.unsafe(nil), typed_overrides: T.unsafe(nil)); end
|
781
|
+
|
782
|
+
private
|
783
|
+
|
784
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#197
|
785
|
+
sig { params(name: ::String, content: ::String).returns(::String) }
|
786
|
+
def add_header(name, content); end
|
787
|
+
|
788
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#217
|
789
|
+
sig { params(name: ::String, content: ::String).returns(::String) }
|
790
|
+
def apply_typed_override(name, content); end
|
791
|
+
|
792
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#39
|
793
|
+
sig { override.void }
|
794
|
+
def execute; end
|
795
|
+
|
796
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#136
|
797
|
+
sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).void }
|
798
|
+
def fetch_annotation(repo_uris, gem_info); end
|
799
|
+
|
800
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#113
|
801
|
+
sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) }
|
802
|
+
def fetch_annotations(project_gems); end
|
803
|
+
|
804
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#156
|
805
|
+
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
|
806
|
+
def fetch_file(repo_uri, path); end
|
807
|
+
|
808
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#173
|
809
|
+
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
|
810
|
+
def fetch_http_file(repo_uri, path); end
|
811
|
+
|
812
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#102
|
813
|
+
sig { params(repo_uri: ::String, repo_number: T.nilable(::Integer)).returns(T.nilable(Tapioca::RepoIndex)) }
|
814
|
+
def fetch_index(repo_uri, repo_number:); end
|
815
|
+
|
816
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#81
|
817
|
+
sig { returns(T::Hash[::String, Tapioca::RepoIndex]) }
|
818
|
+
def fetch_indexes; end
|
819
|
+
|
820
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#165
|
821
|
+
sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) }
|
822
|
+
def fetch_local_file(repo_uri, path); end
|
823
|
+
|
824
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#229
|
825
|
+
sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) }
|
826
|
+
def filter_versions(gem_version, content); end
|
827
|
+
|
828
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#50
|
829
|
+
sig { returns(T::Array[::Tapioca::GemInfo]) }
|
830
|
+
def list_gemfile_gems; end
|
831
|
+
|
832
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#237
|
833
|
+
sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) }
|
834
|
+
def merge_files(gem_name, contents); end
|
835
|
+
|
836
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#60
|
837
|
+
sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void }
|
838
|
+
def remove_expired_annotations(project_gems); end
|
839
|
+
|
840
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#264
|
841
|
+
sig { returns(T::Hash[::String, T.nilable(::String)]) }
|
842
|
+
def repo_tokens; end
|
843
|
+
|
844
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#292
|
845
|
+
sig { params(path: ::String, repo_uri: ::String, message: ::String).void }
|
846
|
+
def say_http_error(path, repo_uri, message:); end
|
847
|
+
|
848
|
+
# source://tapioca//lib/tapioca/commands/annotations.rb#276
|
849
|
+
sig { params(repo_uri: ::String).returns(T.nilable(::String)) }
|
850
|
+
def token_for(repo_uri); end
|
851
|
+
end
|
852
|
+
|
853
|
+
# source://tapioca//lib/tapioca/commands/check_shims.rb#6
|
854
|
+
class Tapioca::Commands::CheckShims < ::Tapioca::Commands::CommandWithoutTracker
|
855
|
+
include ::Tapioca::SorbetHelper
|
856
|
+
include ::Tapioca::RBIFilesHelper
|
857
|
+
|
858
|
+
# source://tapioca//lib/tapioca/commands/check_shims.rb#22
|
859
|
+
sig do
|
860
|
+
params(
|
861
|
+
gem_rbi_dir: ::String,
|
862
|
+
dsl_rbi_dir: ::String,
|
863
|
+
annotations_rbi_dir: ::String,
|
864
|
+
shim_rbi_dir: ::String,
|
865
|
+
todo_rbi_file: ::String,
|
866
|
+
payload: T::Boolean,
|
867
|
+
number_of_workers: T.nilable(::Integer)
|
868
|
+
).void
|
869
|
+
end
|
870
|
+
def initialize(gem_rbi_dir:, dsl_rbi_dir:, annotations_rbi_dir:, shim_rbi_dir:, todo_rbi_file:, payload:, number_of_workers:); end
|
871
|
+
|
872
|
+
private
|
873
|
+
|
874
|
+
# source://tapioca//lib/tapioca/commands/check_shims.rb#44
|
875
|
+
sig { override.void }
|
876
|
+
def execute; end
|
877
|
+
end
|
878
|
+
|
879
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
880
|
+
#
|
881
|
+
# source://tapioca//lib/tapioca/commands/command.rb#6
|
882
|
+
class Tapioca::Commands::Command
|
883
|
+
include ::Thor::Base
|
884
|
+
include ::Thor::Invocation
|
885
|
+
include ::Thor::Shell
|
886
|
+
include ::Tapioca::CliHelper
|
887
|
+
extend ::Thor::Base::ClassMethods
|
888
|
+
extend ::Thor::Invocation::ClassMethods
|
889
|
+
|
890
|
+
abstract!
|
891
|
+
|
892
|
+
# source://tapioca//lib/tapioca/commands/command.rb#20
|
893
|
+
sig { void }
|
894
|
+
def initialize; end
|
895
|
+
|
896
|
+
# source://thor/1.3.1/lib/thor/base.rb#155
|
897
|
+
sig { returns(::Thor::Actions) }
|
898
|
+
def file_writer; end
|
899
|
+
|
900
|
+
# source://tapioca//lib/tapioca/commands/command.rb#25
|
901
|
+
sig(:final) { void }
|
902
|
+
def run; end
|
903
|
+
|
904
|
+
private
|
905
|
+
|
906
|
+
# source://tapioca//lib/tapioca/commands/command.rb#53
|
907
|
+
sig do
|
908
|
+
params(
|
909
|
+
path: T.any(::Pathname, ::String),
|
910
|
+
content: ::String,
|
911
|
+
force: T::Boolean,
|
912
|
+
skip: T::Boolean,
|
913
|
+
verbose: T::Boolean
|
914
|
+
).void
|
915
|
+
end
|
916
|
+
def create_file(path, content, force: T.unsafe(nil), skip: T.unsafe(nil), verbose: T.unsafe(nil)); end
|
917
|
+
|
918
|
+
# source://tapioca//lib/tapioca/commands/command.rb#37
|
919
|
+
sig { params(command: ::Symbol, args: ::String).returns(::String) }
|
920
|
+
def default_command(command, *args); end
|
921
|
+
|
922
|
+
# @abstract
|
923
|
+
#
|
924
|
+
# source://tapioca//lib/tapioca/commands/command.rb#34
|
925
|
+
sig { abstract.void }
|
926
|
+
def execute; end
|
927
|
+
|
928
|
+
# source://tapioca//lib/tapioca/commands/command.rb#63
|
929
|
+
sig { params(path: T.any(::Pathname, ::String), verbose: T::Boolean).void }
|
930
|
+
def remove_file(path, verbose: T.unsafe(nil)); end
|
931
|
+
end
|
932
|
+
|
933
|
+
# source://tapioca//lib/tapioca/commands/command.rb#10
|
934
|
+
class Tapioca::Commands::Command::FileWriter < ::Thor
|
935
|
+
include ::Thor::Actions
|
936
|
+
extend ::Thor::Actions::ClassMethods
|
937
|
+
end
|
938
|
+
|
939
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
940
|
+
#
|
941
|
+
# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#6
|
942
|
+
class Tapioca::Commands::CommandWithoutTracker < ::Tapioca::Commands::Command
|
943
|
+
abstract!
|
944
|
+
|
945
|
+
# source://tapioca//lib/tapioca/commands/command_without_tracker.rb#12
|
946
|
+
sig { void }
|
947
|
+
def initialize; end
|
948
|
+
end
|
949
|
+
|
950
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#6
|
951
|
+
class Tapioca::Commands::Configure < ::Tapioca::Commands::CommandWithoutTracker
|
952
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#14
|
953
|
+
sig { params(sorbet_config: ::String, tapioca_config: ::String, default_postrequire: ::String).void }
|
954
|
+
def initialize(sorbet_config:, tapioca_config:, default_postrequire:); end
|
955
|
+
|
956
|
+
private
|
957
|
+
|
958
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#79
|
959
|
+
sig { void }
|
960
|
+
def create_binstub; end
|
961
|
+
|
962
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#69
|
963
|
+
sig { void }
|
964
|
+
def create_post_require; end
|
965
|
+
|
966
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#40
|
967
|
+
sig { void }
|
968
|
+
def create_sorbet_config; end
|
969
|
+
|
970
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#50
|
971
|
+
sig { void }
|
972
|
+
def create_tapioca_config; end
|
973
|
+
|
974
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#32
|
975
|
+
sig { override.void }
|
976
|
+
def execute; end
|
977
|
+
|
978
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#92
|
979
|
+
sig { returns(::Bundler::Installer) }
|
980
|
+
def installer; end
|
981
|
+
|
982
|
+
# source://tapioca//lib/tapioca/commands/configure.rb#97
|
983
|
+
sig { returns(T.any(::Bundler::StubSpecification, ::Gem::Specification)) }
|
984
|
+
def spec; end
|
985
|
+
end
|
986
|
+
|
987
|
+
# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#6
|
988
|
+
class Tapioca::Commands::DslCompilerList < ::Tapioca::Commands::AbstractDsl
|
989
|
+
private
|
990
|
+
|
991
|
+
# source://tapioca//lib/tapioca/commands/dsl_compiler_list.rb#10
|
992
|
+
sig { override.void }
|
993
|
+
def execute; end
|
994
|
+
end
|
995
|
+
|
996
|
+
# source://tapioca//lib/tapioca/commands/dsl_generate.rb#6
|
997
|
+
class Tapioca::Commands::DslGenerate < ::Tapioca::Commands::AbstractDsl
|
998
|
+
private
|
999
|
+
|
1000
|
+
# source://tapioca//lib/tapioca/commands/dsl_generate.rb#10
|
1001
|
+
sig { override.void }
|
1002
|
+
def execute; end
|
1003
|
+
end
|
1004
|
+
|
1005
|
+
# source://tapioca//lib/tapioca/commands/dsl_verify.rb#6
|
1006
|
+
class Tapioca::Commands::DslVerify < ::Tapioca::Commands::AbstractDsl
|
1007
|
+
private
|
1008
|
+
|
1009
|
+
# source://tapioca//lib/tapioca/commands/dsl_verify.rb#10
|
1010
|
+
sig { override.void }
|
1011
|
+
def execute; end
|
1012
|
+
end
|
1013
|
+
|
1014
|
+
# source://tapioca//lib/tapioca/commands/gem_generate.rb#6
|
1015
|
+
class Tapioca::Commands::GemGenerate < ::Tapioca::Commands::AbstractGem
|
1016
|
+
private
|
1017
|
+
|
1018
|
+
# source://tapioca//lib/tapioca/commands/gem_generate.rb#10
|
1019
|
+
sig { override.void }
|
1020
|
+
def execute; end
|
1021
|
+
end
|
1022
|
+
|
1023
|
+
# source://tapioca//lib/tapioca/commands/gem_sync.rb#6
|
1024
|
+
class Tapioca::Commands::GemSync < ::Tapioca::Commands::AbstractGem
|
1025
|
+
private
|
1026
|
+
|
1027
|
+
# source://tapioca//lib/tapioca/commands/gem_sync.rb#10
|
1028
|
+
sig { override.void }
|
1029
|
+
def execute; end
|
1030
|
+
end
|
1031
|
+
|
1032
|
+
# source://tapioca//lib/tapioca/commands/gem_verify.rb#6
|
1033
|
+
class Tapioca::Commands::GemVerify < ::Tapioca::Commands::AbstractGem
|
1034
|
+
private
|
1035
|
+
|
1036
|
+
# source://tapioca//lib/tapioca/commands/gem_verify.rb#10
|
1037
|
+
sig { override.void }
|
1038
|
+
def execute; end
|
1039
|
+
|
1040
|
+
# source://tapioca//lib/tapioca/commands/gem_verify.rb#17
|
1041
|
+
sig { void }
|
1042
|
+
def perform_sync_verification; end
|
1043
|
+
end
|
1044
|
+
|
1045
|
+
# source://tapioca//lib/tapioca/commands/require.rb#6
|
1046
|
+
class Tapioca::Commands::Require < ::Tapioca::Commands::CommandWithoutTracker
|
1047
|
+
# source://tapioca//lib/tapioca/commands/require.rb#13
|
1048
|
+
sig { params(requires_path: ::String, sorbet_config_path: ::String).void }
|
1049
|
+
def initialize(requires_path:, sorbet_config_path:); end
|
1050
|
+
|
1051
|
+
private
|
1052
|
+
|
1053
|
+
# source://tapioca//lib/tapioca/commands/require.rb#23
|
1054
|
+
sig { override.void }
|
1055
|
+
def execute; end
|
1056
|
+
end
|
1057
|
+
|
1058
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#6
|
1059
|
+
class Tapioca::Commands::Todo < ::Tapioca::Commands::CommandWithoutTracker
|
1060
|
+
include ::Tapioca::SorbetHelper
|
1061
|
+
|
1062
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#26
|
1063
|
+
sig { params(todo_file: ::String, file_header: T::Boolean).void }
|
1064
|
+
def initialize(todo_file:, file_header:); end
|
1065
|
+
|
1066
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#34
|
1067
|
+
sig { void }
|
1068
|
+
def run_with_deprecation; end
|
1069
|
+
|
1070
|
+
private
|
1071
|
+
|
1072
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#44
|
1073
|
+
sig { override.void }
|
1074
|
+
def execute; end
|
1075
|
+
|
1076
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#68
|
1077
|
+
sig { params(constants: T::Array[::String], command: ::String).returns(::RBI::File) }
|
1078
|
+
def rbi(constants, command:); end
|
1079
|
+
|
1080
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#88
|
1081
|
+
sig { returns(T::Array[::String]) }
|
1082
|
+
def unresolved_constants; end
|
1083
|
+
end
|
1084
|
+
|
1085
|
+
# source://tapioca//lib/tapioca/commands/todo.rb#9
|
1086
|
+
Tapioca::Commands::Todo::DEPRECATION_MESSAGE = T.let(T.unsafe(nil), String)
|
1087
|
+
|
1088
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#5
|
1089
|
+
module Tapioca::ConfigHelper
|
1090
|
+
requires_ancestor { Thor }
|
1091
|
+
|
1092
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#18
|
1093
|
+
sig { params(args: T.untyped, local_options: T.untyped, config: T.untyped).void }
|
1094
|
+
def initialize(args = T.unsafe(nil), local_options = T.unsafe(nil), config = T.unsafe(nil)); end
|
1095
|
+
|
1096
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#12
|
1097
|
+
sig { returns(::String) }
|
1098
|
+
def command_name; end
|
1099
|
+
|
1100
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#15
|
1101
|
+
sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
|
1102
|
+
def defaults; end
|
1103
|
+
|
1104
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#34
|
1105
|
+
sig { returns(::Thor::CoreExt::HashWithIndifferentAccess) }
|
1106
|
+
def options; end
|
1107
|
+
|
1108
|
+
private
|
1109
|
+
|
1110
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#153
|
1111
|
+
sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) }
|
1112
|
+
def build_error(msg); end
|
1113
|
+
|
1114
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#178
|
1115
|
+
sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) }
|
1116
|
+
def build_error_message(config_file, errors); end
|
1117
|
+
|
1118
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#56
|
1119
|
+
sig do
|
1120
|
+
params(
|
1121
|
+
options: ::Thor::CoreExt::HashWithIndifferentAccess
|
1122
|
+
).returns(::Thor::CoreExt::HashWithIndifferentAccess)
|
1123
|
+
end
|
1124
|
+
def config_options(options); end
|
1125
|
+
|
1126
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#46
|
1127
|
+
sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void }
|
1128
|
+
def filter_defaults(options); end
|
1129
|
+
|
1130
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#196
|
1131
|
+
sig do
|
1132
|
+
params(
|
1133
|
+
options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess)
|
1134
|
+
).returns(::Thor::CoreExt::HashWithIndifferentAccess)
|
1135
|
+
end
|
1136
|
+
def merge_options(*options); end
|
1137
|
+
|
1138
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#70
|
1139
|
+
sig { params(config_file: ::String, config: T::Hash[T.untyped, T.untyped]).void }
|
1140
|
+
def validate_config!(config_file, config); end
|
1141
|
+
|
1142
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#102
|
1143
|
+
sig do
|
1144
|
+
params(
|
1145
|
+
command_options: T::Hash[::Symbol, ::Thor::Option],
|
1146
|
+
config_key: ::String,
|
1147
|
+
config_options: T::Hash[T.untyped, T.untyped]
|
1148
|
+
).returns(T::Array[::Tapioca::ConfigHelper::ConfigError])
|
1149
|
+
end
|
1150
|
+
def validate_config_options(command_options, config_key, config_options); end
|
1151
|
+
end
|
1152
|
+
|
1153
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#148
|
1154
|
+
class Tapioca::ConfigHelper::ConfigError < ::T::Struct
|
1155
|
+
const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart]
|
1156
|
+
|
1157
|
+
class << self
|
1158
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
1159
|
+
def inherited(s); end
|
1160
|
+
end
|
1161
|
+
end
|
1162
|
+
|
1163
|
+
# source://tapioca//lib/tapioca/helpers/config_helper.rb#143
|
1164
|
+
class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct
|
1165
|
+
const :message, ::String
|
1166
|
+
const :colors, T::Array[::Symbol]
|
1167
|
+
|
1168
|
+
class << self
|
1169
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
1170
|
+
def inherited(s); end
|
1171
|
+
end
|
1172
|
+
end
|
1173
|
+
|
1174
|
+
# source://tapioca//lib/tapioca.rb#45
|
1175
|
+
Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String)
|
1176
|
+
|
1177
|
+
# source://tapioca//lib/tapioca.rb#41
|
1178
|
+
Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String)
|
1179
|
+
|
1180
|
+
# source://tapioca//lib/tapioca.rb#57
|
1181
|
+
Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String)
|
1182
|
+
|
1183
|
+
# source://tapioca//lib/tapioca.rb#42
|
1184
|
+
Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String)
|
1185
|
+
|
1186
|
+
# source://tapioca//lib/tapioca.rb#47
|
1187
|
+
Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash)
|
1188
|
+
|
1189
|
+
# source://tapioca//lib/tapioca.rb#39
|
1190
|
+
Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String)
|
1191
|
+
|
1192
|
+
# source://tapioca//lib/tapioca.rb#40
|
1193
|
+
Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String)
|
1194
|
+
|
1195
|
+
# source://tapioca//lib/tapioca/rbi_formatter.rb#31
|
1196
|
+
Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter)
|
1197
|
+
|
1198
|
+
# source://tapioca//lib/tapioca.rb#56
|
1199
|
+
Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer)
|
1200
|
+
|
1201
|
+
# source://tapioca//lib/tapioca.rb#43
|
1202
|
+
Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String)
|
1203
|
+
|
1204
|
+
# source://tapioca//lib/tapioca.rb#44
|
1205
|
+
Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String)
|
1206
|
+
|
1207
|
+
# source://tapioca//lib/tapioca/dsl/compilers.rb#5
|
1208
|
+
module Tapioca::Dsl; end
|
1209
|
+
|
1210
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1211
|
+
#
|
1212
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#6
|
1213
|
+
class Tapioca::Dsl::Compiler
|
1214
|
+
extend T::Generic
|
1215
|
+
include ::Tapioca::SorbetHelper
|
1216
|
+
include ::Tapioca::RBIHelper
|
1217
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1218
|
+
include ::Tapioca::Runtime::Reflection
|
1219
|
+
extend ::Tapioca::Runtime::AttachedClassOf
|
1220
|
+
extend ::Tapioca::Runtime::Reflection
|
1221
|
+
|
1222
|
+
abstract!
|
1223
|
+
|
1224
|
+
ConstantType = type_member { { upper: Module } }
|
1225
|
+
|
1226
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#74
|
1227
|
+
sig do
|
1228
|
+
params(
|
1229
|
+
pipeline: ::Tapioca::Dsl::Pipeline,
|
1230
|
+
root: ::RBI::Tree,
|
1231
|
+
constant: ConstantType,
|
1232
|
+
options: T::Hash[::String, T.untyped]
|
1233
|
+
).void
|
1234
|
+
end
|
1235
|
+
def initialize(pipeline, root, constant, options = T.unsafe(nil)); end
|
1236
|
+
|
1237
|
+
# NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`.
|
1238
|
+
#
|
1239
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#92
|
1240
|
+
sig { params(error: ::String).void }
|
1241
|
+
def add_error(error); end
|
1242
|
+
|
1243
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#83
|
1244
|
+
sig { params(compiler_name: ::String).returns(T::Boolean) }
|
1245
|
+
def compiler_enabled?(compiler_name); end
|
1246
|
+
|
1247
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#20
|
1248
|
+
sig { returns(ConstantType) }
|
1249
|
+
def constant; end
|
1250
|
+
|
1251
|
+
# @abstract
|
1252
|
+
#
|
1253
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#88
|
1254
|
+
sig { abstract.void }
|
1255
|
+
def decorate; end
|
1256
|
+
|
1257
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#26
|
1258
|
+
sig { returns(T::Hash[::String, T.untyped]) }
|
1259
|
+
def options; end
|
1260
|
+
|
1261
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#23
|
1262
|
+
sig { returns(::RBI::Tree) }
|
1263
|
+
def root; end
|
1264
|
+
|
1265
|
+
private
|
1266
|
+
|
1267
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#141
|
1268
|
+
sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) }
|
1269
|
+
def compile_method_parameters_to_rbi(method_def); end
|
1270
|
+
|
1271
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#177
|
1272
|
+
sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) }
|
1273
|
+
def compile_method_return_type_to_rbi(method_def); end
|
1274
|
+
|
1275
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#131
|
1276
|
+
sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void }
|
1277
|
+
def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end
|
1278
|
+
|
1279
|
+
# Get the types of each parameter from a method signature
|
1280
|
+
#
|
1281
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#105
|
1282
|
+
sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) }
|
1283
|
+
def parameters_types_from_signature(method_def, signature); end
|
1284
|
+
|
1285
|
+
class << self
|
1286
|
+
# @abstract
|
1287
|
+
#
|
1288
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#37
|
1289
|
+
sig { abstract.returns(T::Enumerable[::Module]) }
|
1290
|
+
def gather_constants; end
|
1291
|
+
|
1292
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#32
|
1293
|
+
sig { params(constant: ::Module).returns(T::Boolean) }
|
1294
|
+
def handles?(constant); end
|
1295
|
+
|
1296
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#40
|
1297
|
+
sig { returns(T::Set[::Module]) }
|
1298
|
+
def processable_constants; end
|
1299
|
+
|
1300
|
+
private
|
1301
|
+
|
1302
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#50
|
1303
|
+
sig { returns(T::Enumerable[T::Class[T.anything]]) }
|
1304
|
+
def all_classes; end
|
1305
|
+
|
1306
|
+
# source://tapioca//lib/tapioca/dsl/compiler.rb#58
|
1307
|
+
sig { returns(T::Enumerable[::Module]) }
|
1308
|
+
def all_modules; end
|
1309
|
+
end
|
1310
|
+
end
|
1311
|
+
|
1312
|
+
# source://tapioca//lib/tapioca/dsl/compilers.rb#6
|
1313
|
+
module Tapioca::Dsl::Compilers; end
|
1314
|
+
|
1315
|
+
# DSL compilers are either built-in to Tapioca and live under the
|
1316
|
+
# `Tapioca::Dsl::Compilers` namespace (i.e. this namespace), and
|
1317
|
+
# can be referred to by just using the class name, or they live in
|
1318
|
+
# a different namespace and can only be referred to using their fully
|
1319
|
+
# qualified name. This constant encapsulates that dual lookup when
|
1320
|
+
# a compiler needs to be resolved by name.
|
1321
|
+
#
|
1322
|
+
# source://tapioca//lib/tapioca/dsl/compilers.rb#13
|
1323
|
+
Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array)
|
1324
|
+
|
1325
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#6
|
1326
|
+
class Tapioca::Dsl::Pipeline
|
1327
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#39
|
1328
|
+
sig do
|
1329
|
+
params(
|
1330
|
+
requested_constants: T::Array[::Module],
|
1331
|
+
requested_paths: T::Array[::Pathname],
|
1332
|
+
requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
|
1333
|
+
excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
|
1334
|
+
error_handler: T.proc.params(error: ::String).void,
|
1335
|
+
skipped_constants: T::Array[::Module],
|
1336
|
+
number_of_workers: T.nilable(::Integer),
|
1337
|
+
compiler_options: T::Hash[::String, T.untyped]
|
1338
|
+
).void
|
1339
|
+
end
|
1340
|
+
def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil)); end
|
1341
|
+
|
1342
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#10
|
1343
|
+
sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) }
|
1344
|
+
def active_compilers; end
|
1345
|
+
|
1346
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#102
|
1347
|
+
sig { params(error: ::String).void }
|
1348
|
+
def add_error(error); end
|
1349
|
+
|
1350
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#107
|
1351
|
+
sig { params(compiler_name: ::String).returns(T::Boolean) }
|
1352
|
+
def compiler_enabled?(compiler_name); end
|
1353
|
+
|
1354
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#116
|
1355
|
+
sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) }
|
1356
|
+
def compilers; end
|
1357
|
+
|
1358
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#22
|
1359
|
+
sig { returns(T.proc.params(error: ::String).void) }
|
1360
|
+
def error_handler; end
|
1361
|
+
|
1362
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#25
|
1363
|
+
sig { returns(T::Array[::String]) }
|
1364
|
+
def errors; end
|
1365
|
+
|
1366
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#13
|
1367
|
+
sig { returns(T::Array[::Module]) }
|
1368
|
+
def requested_constants; end
|
1369
|
+
|
1370
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#16
|
1371
|
+
sig { returns(T::Array[::Pathname]) }
|
1372
|
+
def requested_paths; end
|
1373
|
+
|
1374
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#67
|
1375
|
+
sig do
|
1376
|
+
type_parameters(:T)
|
1377
|
+
.params(
|
1378
|
+
blk: T.proc.params(constant: ::Module, rbi: ::RBI::File).returns(T.type_parameter(:T))
|
1379
|
+
).returns(T::Array[T.type_parameter(:T)])
|
1380
|
+
end
|
1381
|
+
def run(&blk); end
|
1382
|
+
|
1383
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#19
|
1384
|
+
sig { returns(T::Array[::Module]) }
|
1385
|
+
def skipped_constants; end
|
1386
|
+
|
1387
|
+
private
|
1388
|
+
|
1389
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#223
|
1390
|
+
sig { void }
|
1391
|
+
def abort_if_pending_migrations!; end
|
1392
|
+
|
1393
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#168
|
1394
|
+
sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) }
|
1395
|
+
def filter_anonymous_and_reloaded_constants(constants); end
|
1396
|
+
|
1397
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#133
|
1398
|
+
sig do
|
1399
|
+
params(
|
1400
|
+
requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)],
|
1401
|
+
excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)]
|
1402
|
+
).returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)])
|
1403
|
+
end
|
1404
|
+
def gather_active_compilers(requested_compilers, excluded_compilers); end
|
1405
|
+
|
1406
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#147
|
1407
|
+
sig do
|
1408
|
+
params(
|
1409
|
+
requested_constants: T::Array[::Module],
|
1410
|
+
requested_paths: T::Array[::Pathname],
|
1411
|
+
skipped_constants: T::Array[::Module]
|
1412
|
+
).returns(T::Set[::Module])
|
1413
|
+
end
|
1414
|
+
def gather_constants(requested_constants, requested_paths, skipped_constants); end
|
1415
|
+
|
1416
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#197
|
1417
|
+
sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) }
|
1418
|
+
def rbi_for_constant(constant); end
|
1419
|
+
|
1420
|
+
# source://tapioca//lib/tapioca/dsl/pipeline.rb#216
|
1421
|
+
sig { params(error: ::String).returns(T.noreturn) }
|
1422
|
+
def report_error(error); end
|
1423
|
+
end
|
1424
|
+
|
1425
|
+
# source://tapioca//lib/tapioca/helpers/env_helper.rb#5
|
1426
|
+
module Tapioca::EnvHelper
|
1427
|
+
requires_ancestor { Thor }
|
1428
|
+
|
1429
|
+
# source://tapioca//lib/tapioca/helpers/env_helper.rb#12
|
1430
|
+
sig { params(options: T::Hash[::Symbol, T.untyped]).void }
|
1431
|
+
def set_environment(options); end
|
1432
|
+
end
|
1433
|
+
|
1434
|
+
class Tapioca::Error < ::StandardError; end
|
1435
|
+
|
1436
|
+
# source://tapioca//lib/tapioca/executor.rb#5
|
1437
|
+
class Tapioca::Executor
|
1438
|
+
# source://tapioca//lib/tapioca/executor.rb#11
|
1439
|
+
sig { params(queue: T::Array[T.untyped], number_of_workers: T.nilable(::Integer)).void }
|
1440
|
+
def initialize(queue, number_of_workers: T.unsafe(nil)); end
|
1441
|
+
|
1442
|
+
# source://tapioca//lib/tapioca/executor.rb#28
|
1443
|
+
sig do
|
1444
|
+
type_parameters(:T)
|
1445
|
+
.params(
|
1446
|
+
block: T.proc.params(item: T.untyped).returns(T.type_parameter(:T))
|
1447
|
+
).returns(T::Array[T.type_parameter(:T)])
|
1448
|
+
end
|
1449
|
+
def run_in_parallel(&block); end
|
1450
|
+
|
1451
|
+
private
|
1452
|
+
|
1453
|
+
# source://tapioca//lib/tapioca/executor.rb#37
|
1454
|
+
sig { returns(::Integer) }
|
1455
|
+
def max_processors; end
|
1456
|
+
end
|
1457
|
+
|
1458
|
+
# source://tapioca//lib/tapioca/executor.rb#8
|
1459
|
+
Tapioca::Executor::MINIMUM_ITEMS_PER_WORKER = T.let(T.unsafe(nil), Integer)
|
1460
|
+
|
1461
|
+
# source://tapioca//lib/tapioca/gem/events.rb#5
|
1462
|
+
module Tapioca::Gem; end
|
1463
|
+
|
1464
|
+
# source://tapioca//lib/tapioca/gem/events.rb#77
|
1465
|
+
class Tapioca::Gem::ConstNodeAdded < ::Tapioca::Gem::NodeAdded
|
1466
|
+
# source://tapioca//lib/tapioca/gem/events.rb#84
|
1467
|
+
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
|
1468
|
+
def initialize(symbol, constant, node); end
|
1469
|
+
|
1470
|
+
# source://tapioca//lib/tapioca/gem/events.rb#81
|
1471
|
+
sig { returns(::RBI::Const) }
|
1472
|
+
def node; end
|
1473
|
+
end
|
1474
|
+
|
1475
|
+
# source://tapioca//lib/tapioca/gem/events.rb#26
|
1476
|
+
class Tapioca::Gem::ConstantFound < ::Tapioca::Gem::Event
|
1477
|
+
# source://tapioca//lib/tapioca/gem/events.rb#36
|
1478
|
+
sig { params(symbol: ::String, constant: ::BasicObject).void }
|
1479
|
+
def initialize(symbol, constant); end
|
1480
|
+
|
1481
|
+
# source://tapioca//lib/tapioca/gem/events.rb#33
|
1482
|
+
sig { returns(::BasicObject) }
|
1483
|
+
def constant; end
|
1484
|
+
|
1485
|
+
# source://tapioca//lib/tapioca/gem/events.rb#30
|
1486
|
+
sig { returns(::String) }
|
1487
|
+
def symbol; end
|
1488
|
+
end
|
1489
|
+
|
1490
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1491
|
+
#
|
1492
|
+
# source://tapioca//lib/tapioca/gem/events.rb#6
|
1493
|
+
class Tapioca::Gem::Event
|
1494
|
+
abstract!
|
1495
|
+
end
|
1496
|
+
|
1497
|
+
# source://tapioca//lib/tapioca/gem/events.rb#43
|
1498
|
+
class Tapioca::Gem::ForeignConstantFound < ::Tapioca::Gem::ConstantFound
|
1499
|
+
# source://tapioca//lib/tapioca/gem/events.rb#52
|
1500
|
+
sig { params(symbol: ::String, constant: ::Module).void }
|
1501
|
+
def initialize(symbol, constant); end
|
1502
|
+
|
1503
|
+
# source://tapioca//lib/tapioca/gem/events.rb#47
|
1504
|
+
sig { override.returns(::Module) }
|
1505
|
+
def constant; end
|
1506
|
+
end
|
1507
|
+
|
1508
|
+
# source://tapioca//lib/tapioca/gem/events.rb#103
|
1509
|
+
class Tapioca::Gem::ForeignScopeNodeAdded < ::Tapioca::Gem::ScopeNodeAdded; end
|
1510
|
+
|
1511
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#6
|
1512
|
+
module Tapioca::Gem::Listeners; end
|
1513
|
+
|
1514
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1515
|
+
#
|
1516
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#7
|
1517
|
+
class Tapioca::Gem::Listeners::Base
|
1518
|
+
abstract!
|
1519
|
+
|
1520
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#14
|
1521
|
+
sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
|
1522
|
+
def initialize(pipeline); end
|
1523
|
+
|
1524
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#19
|
1525
|
+
sig { params(event: ::Tapioca::Gem::NodeAdded).void }
|
1526
|
+
def dispatch(event); end
|
1527
|
+
|
1528
|
+
private
|
1529
|
+
|
1530
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#49
|
1531
|
+
sig { params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1532
|
+
def ignore?(event); end
|
1533
|
+
|
1534
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#37
|
1535
|
+
sig { params(event: ::Tapioca::Gem::ConstNodeAdded).void }
|
1536
|
+
def on_const(event); end
|
1537
|
+
|
1538
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#45
|
1539
|
+
sig { params(event: ::Tapioca::Gem::MethodNodeAdded).void }
|
1540
|
+
def on_method(event); end
|
1541
|
+
|
1542
|
+
# source://tapioca//lib/tapioca/gem/listeners/base.rb#41
|
1543
|
+
sig { params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1544
|
+
def on_scope(event); end
|
1545
|
+
end
|
1546
|
+
|
1547
|
+
# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#7
|
1548
|
+
class Tapioca::Gem::Listeners::DynamicMixins < ::Tapioca::Gem::Listeners::Base
|
1549
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1550
|
+
include ::Tapioca::Runtime::Reflection
|
1551
|
+
|
1552
|
+
private
|
1553
|
+
|
1554
|
+
# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#31
|
1555
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1556
|
+
def ignore?(event); end
|
1557
|
+
|
1558
|
+
# source://tapioca//lib/tapioca/gem/listeners/dynamic_mixins.rb#15
|
1559
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1560
|
+
def on_scope(event); end
|
1561
|
+
end
|
1562
|
+
|
1563
|
+
# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#7
|
1564
|
+
class Tapioca::Gem::Listeners::ForeignConstants < ::Tapioca::Gem::Listeners::Base
|
1565
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1566
|
+
include ::Tapioca::Runtime::Reflection
|
1567
|
+
|
1568
|
+
private
|
1569
|
+
|
1570
|
+
# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#60
|
1571
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1572
|
+
def ignore?(event); end
|
1573
|
+
|
1574
|
+
# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#55
|
1575
|
+
sig { params(location: ::String).returns(T::Boolean) }
|
1576
|
+
def mixed_in_by_gem?(location); end
|
1577
|
+
|
1578
|
+
# source://tapioca//lib/tapioca/gem/listeners/foreign_constants.rb#15
|
1579
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1580
|
+
def on_scope(event); end
|
1581
|
+
end
|
1582
|
+
|
1583
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#7
|
1584
|
+
class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base
|
1585
|
+
include ::Tapioca::SorbetHelper
|
1586
|
+
include ::Tapioca::RBIHelper
|
1587
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1588
|
+
include ::Tapioca::Runtime::Reflection
|
1589
|
+
|
1590
|
+
private
|
1591
|
+
|
1592
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#35
|
1593
|
+
sig do
|
1594
|
+
params(
|
1595
|
+
tree: ::RBI::Tree,
|
1596
|
+
module_name: ::String,
|
1597
|
+
mod: ::Module,
|
1598
|
+
for_visibility: T::Array[::Symbol],
|
1599
|
+
attached_class: T.nilable(::Module)
|
1600
|
+
).void
|
1601
|
+
end
|
1602
|
+
def compile_directly_owned_methods(tree, module_name, mod, for_visibility = T.unsafe(nil), attached_class: T.unsafe(nil)); end
|
1603
|
+
|
1604
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#71
|
1605
|
+
sig do
|
1606
|
+
params(
|
1607
|
+
tree: ::RBI::Tree,
|
1608
|
+
symbol_name: ::String,
|
1609
|
+
constant: ::Module,
|
1610
|
+
method: T.nilable(::UnboundMethod),
|
1611
|
+
visibility: ::RBI::Visibility
|
1612
|
+
).void
|
1613
|
+
end
|
1614
|
+
def compile_method(tree, symbol_name, constant, method, visibility = T.unsafe(nil)); end
|
1615
|
+
|
1616
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#211
|
1617
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1618
|
+
def ignore?(event); end
|
1619
|
+
|
1620
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#204
|
1621
|
+
sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) }
|
1622
|
+
def initialize_method_for(constant); end
|
1623
|
+
|
1624
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#172
|
1625
|
+
sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) }
|
1626
|
+
def method_names_by_visibility(mod); end
|
1627
|
+
|
1628
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#196
|
1629
|
+
sig { params(attached_class: T.nilable(::Module), method_name: ::Symbol).returns(T.nilable(T::Boolean)) }
|
1630
|
+
def method_new_in_abstract_class?(attached_class, method_name); end
|
1631
|
+
|
1632
|
+
# Check whether the method is defined by the constant.
|
1633
|
+
#
|
1634
|
+
# In most cases, it works to check that the constant is the method owner. However,
|
1635
|
+
# in the case that a method is also defined in a module prepended to the constant, it
|
1636
|
+
# will be owned by the prepended module, not the constant.
|
1637
|
+
#
|
1638
|
+
# This method implements a better way of checking whether a constant defines a method.
|
1639
|
+
# It walks up the ancestor tree via the `super_method` method; if any of the super
|
1640
|
+
# methods are owned by the constant, it means that the constant declares the method.
|
1641
|
+
#
|
1642
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#158
|
1643
|
+
sig { params(method: ::UnboundMethod, constant: ::Module).returns(T::Boolean) }
|
1644
|
+
def method_owned_by_constant?(method, constant); end
|
1645
|
+
|
1646
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#16
|
1647
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1648
|
+
def on_scope(event); end
|
1649
|
+
|
1650
|
+
# source://tapioca//lib/tapioca/gem/listeners/methods.rb#181
|
1651
|
+
sig { params(constant: ::Module, method_name: ::String).returns(T::Boolean) }
|
1652
|
+
def struct_method?(constant, method_name); end
|
1653
|
+
end
|
1654
|
+
|
1655
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#7
|
1656
|
+
class Tapioca::Gem::Listeners::Mixins < ::Tapioca::Gem::Listeners::Base
|
1657
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1658
|
+
include ::Tapioca::Runtime::Reflection
|
1659
|
+
|
1660
|
+
private
|
1661
|
+
|
1662
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#42
|
1663
|
+
sig do
|
1664
|
+
params(
|
1665
|
+
tree: ::RBI::Tree,
|
1666
|
+
constant: ::Module,
|
1667
|
+
mods: T::Array[::Module],
|
1668
|
+
mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type
|
1669
|
+
).void
|
1670
|
+
end
|
1671
|
+
def add_mixins(tree, constant, mods, mixin_type); end
|
1672
|
+
|
1673
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#84
|
1674
|
+
sig { params(mixin_name: ::String).returns(T::Boolean) }
|
1675
|
+
def filtered_mixin?(mixin_name); end
|
1676
|
+
|
1677
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#91
|
1678
|
+
sig { params(constant: ::Module).returns(T::Array[::Module]) }
|
1679
|
+
def interesting_ancestors_of(constant); end
|
1680
|
+
|
1681
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#75
|
1682
|
+
sig do
|
1683
|
+
params(
|
1684
|
+
constant: ::Module,
|
1685
|
+
mixin: ::Module,
|
1686
|
+
mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type
|
1687
|
+
).returns(T::Boolean)
|
1688
|
+
end
|
1689
|
+
def mixed_in_by_gem?(constant, mixin, mixin_type); end
|
1690
|
+
|
1691
|
+
# source://tapioca//lib/tapioca/gem/listeners/mixins.rb#15
|
1692
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1693
|
+
def on_scope(event); end
|
1694
|
+
end
|
1695
|
+
|
1696
|
+
# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#7
|
1697
|
+
class Tapioca::Gem::Listeners::RemoveEmptyPayloadScopes < ::Tapioca::Gem::Listeners::Base
|
1698
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1699
|
+
include ::Tapioca::Runtime::Reflection
|
1700
|
+
|
1701
|
+
private
|
1702
|
+
|
1703
|
+
# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#20
|
1704
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1705
|
+
def ignore?(event); end
|
1706
|
+
|
1707
|
+
# source://tapioca//lib/tapioca/gem/listeners/remove_empty_payload_scopes.rb#15
|
1708
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1709
|
+
def on_scope(event); end
|
1710
|
+
end
|
1711
|
+
|
1712
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#7
|
1713
|
+
class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base
|
1714
|
+
private
|
1715
|
+
|
1716
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25
|
1717
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1718
|
+
def ignore?(event); end
|
1719
|
+
|
1720
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#13
|
1721
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1722
|
+
def on_scope(event); end
|
1723
|
+
end
|
1724
|
+
|
1725
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#7
|
1726
|
+
class Tapioca::Gem::Listeners::SorbetHelpers < ::Tapioca::Gem::Listeners::Base
|
1727
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1728
|
+
include ::Tapioca::Runtime::Reflection
|
1729
|
+
|
1730
|
+
private
|
1731
|
+
|
1732
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#27
|
1733
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1734
|
+
def ignore?(event); end
|
1735
|
+
|
1736
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_helpers.rb#15
|
1737
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1738
|
+
def on_scope(event); end
|
1739
|
+
end
|
1740
|
+
|
1741
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#7
|
1742
|
+
class Tapioca::Gem::Listeners::SorbetProps < ::Tapioca::Gem::Listeners::Base
|
1743
|
+
include ::Tapioca::SorbetHelper
|
1744
|
+
include ::Tapioca::RBIHelper
|
1745
|
+
|
1746
|
+
private
|
1747
|
+
|
1748
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#33
|
1749
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1750
|
+
def ignore?(event); end
|
1751
|
+
|
1752
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_props.rb#14
|
1753
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1754
|
+
def on_scope(event); end
|
1755
|
+
end
|
1756
|
+
|
1757
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#7
|
1758
|
+
class Tapioca::Gem::Listeners::SorbetRequiredAncestors < ::Tapioca::Gem::Listeners::Base
|
1759
|
+
private
|
1760
|
+
|
1761
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#23
|
1762
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1763
|
+
def ignore?(event); end
|
1764
|
+
|
1765
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_required_ancestors.rb#13
|
1766
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1767
|
+
def on_scope(event); end
|
1768
|
+
end
|
1769
|
+
|
1770
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#7
|
1771
|
+
class Tapioca::Gem::Listeners::SorbetSignatures < ::Tapioca::Gem::Listeners::Base
|
1772
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1773
|
+
include ::Tapioca::Runtime::Reflection
|
1774
|
+
include ::Tapioca::SorbetHelper
|
1775
|
+
include ::Tapioca::RBIHelper
|
1776
|
+
|
1777
|
+
private
|
1778
|
+
|
1779
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#26
|
1780
|
+
sig { params(signature: T.untyped, parameters: T::Array[[::Symbol, ::String]]).returns(::RBI::Sig) }
|
1781
|
+
def compile_signature(signature, parameters); end
|
1782
|
+
|
1783
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#79
|
1784
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1785
|
+
def ignore?(event); end
|
1786
|
+
|
1787
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#18
|
1788
|
+
sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
|
1789
|
+
def on_method(event); end
|
1790
|
+
|
1791
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#68
|
1792
|
+
sig { params(signature: T.untyped).returns(T::Boolean) }
|
1793
|
+
def signature_final?(signature); end
|
1794
|
+
end
|
1795
|
+
|
1796
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_signatures.rb#13
|
1797
|
+
Tapioca::Gem::Listeners::SorbetSignatures::TYPE_PARAMETER_MATCHER = T.let(T.unsafe(nil), Regexp)
|
1798
|
+
|
1799
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#7
|
1800
|
+
class Tapioca::Gem::Listeners::SorbetTypeVariables < ::Tapioca::Gem::Listeners::Base
|
1801
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1802
|
+
include ::Tapioca::Runtime::Reflection
|
1803
|
+
|
1804
|
+
private
|
1805
|
+
|
1806
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#27
|
1807
|
+
sig { params(tree: ::RBI::Tree, constant: ::Module).void }
|
1808
|
+
def compile_type_variable_declarations(tree, constant); end
|
1809
|
+
|
1810
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#63
|
1811
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1812
|
+
def ignore?(event); end
|
1813
|
+
|
1814
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#50
|
1815
|
+
sig { params(type_variable: ::Tapioca::TypeVariableModule).returns(T.nilable(::RBI::Node)) }
|
1816
|
+
def node_from_type_variable(type_variable); end
|
1817
|
+
|
1818
|
+
# source://tapioca//lib/tapioca/gem/listeners/sorbet_type_variables.rb#15
|
1819
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1820
|
+
def on_scope(event); end
|
1821
|
+
end
|
1822
|
+
|
1823
|
+
# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#7
|
1824
|
+
class Tapioca::Gem::Listeners::SourceLocation < ::Tapioca::Gem::Listeners::Base
|
1825
|
+
private
|
1826
|
+
|
1827
|
+
# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#41
|
1828
|
+
sig { params(node: ::RBI::NodeWithComments, file: T.nilable(::String), line: T.nilable(::Integer)).void }
|
1829
|
+
def add_source_location_comment(node, file, line); end
|
1830
|
+
|
1831
|
+
# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#13
|
1832
|
+
sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void }
|
1833
|
+
def on_const(event); end
|
1834
|
+
|
1835
|
+
# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#35
|
1836
|
+
sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
|
1837
|
+
def on_method(event); end
|
1838
|
+
|
1839
|
+
# source://tapioca//lib/tapioca/gem/listeners/source_location.rb#19
|
1840
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1841
|
+
def on_scope(event); end
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#7
|
1845
|
+
class Tapioca::Gem::Listeners::Subconstants < ::Tapioca::Gem::Listeners::Base
|
1846
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1847
|
+
include ::Tapioca::Runtime::Reflection
|
1848
|
+
|
1849
|
+
private
|
1850
|
+
|
1851
|
+
# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#36
|
1852
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1853
|
+
def ignore?(event); end
|
1854
|
+
|
1855
|
+
# source://tapioca//lib/tapioca/gem/listeners/subconstants.rb#15
|
1856
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1857
|
+
def on_scope(event); end
|
1858
|
+
end
|
1859
|
+
|
1860
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#7
|
1861
|
+
class Tapioca::Gem::Listeners::YardDoc < ::Tapioca::Gem::Listeners::Base
|
1862
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#27
|
1863
|
+
sig { params(pipeline: ::Tapioca::Gem::Pipeline).void }
|
1864
|
+
def initialize(pipeline); end
|
1865
|
+
|
1866
|
+
private
|
1867
|
+
|
1868
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#55
|
1869
|
+
sig { params(name: ::String, sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) }
|
1870
|
+
def documentation_comments(name, sigs: T.unsafe(nil)); end
|
1871
|
+
|
1872
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#99
|
1873
|
+
sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) }
|
1874
|
+
def ignore?(event); end
|
1875
|
+
|
1876
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#36
|
1877
|
+
sig { override.params(event: ::Tapioca::Gem::ConstNodeAdded).void }
|
1878
|
+
def on_const(event); end
|
1879
|
+
|
1880
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#46
|
1881
|
+
sig { override.params(event: ::Tapioca::Gem::MethodNodeAdded).void }
|
1882
|
+
def on_method(event); end
|
1883
|
+
|
1884
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#41
|
1885
|
+
sig { override.params(event: ::Tapioca::Gem::ScopeNodeAdded).void }
|
1886
|
+
def on_scope(event); end
|
1887
|
+
end
|
1888
|
+
|
1889
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#10
|
1890
|
+
Tapioca::Gem::Listeners::YardDoc::IGNORED_COMMENTS = T.let(T.unsafe(nil), Array)
|
1891
|
+
|
1892
|
+
# source://tapioca//lib/tapioca/gem/listeners/yard_doc.rb#24
|
1893
|
+
Tapioca::Gem::Listeners::YardDoc::IGNORED_SIG_TAGS = T.let(T.unsafe(nil), Array)
|
1894
|
+
|
1895
|
+
# source://tapioca//lib/tapioca/gem/events.rb#105
|
1896
|
+
class Tapioca::Gem::MethodNodeAdded < ::Tapioca::Gem::NodeAdded
|
1897
|
+
# source://tapioca//lib/tapioca/gem/events.rb#130
|
1898
|
+
sig do
|
1899
|
+
params(
|
1900
|
+
symbol: ::String,
|
1901
|
+
constant: ::Module,
|
1902
|
+
method: ::UnboundMethod,
|
1903
|
+
node: ::RBI::Method,
|
1904
|
+
signature: T.untyped,
|
1905
|
+
parameters: T::Array[[::Symbol, ::String]]
|
1906
|
+
).void
|
1907
|
+
end
|
1908
|
+
def initialize(symbol, constant, method, node, signature, parameters); end
|
1909
|
+
|
1910
|
+
# source://tapioca//lib/tapioca/gem/events.rb#109
|
1911
|
+
sig { returns(::UnboundMethod) }
|
1912
|
+
def method; end
|
1913
|
+
|
1914
|
+
# source://tapioca//lib/tapioca/gem/events.rb#112
|
1915
|
+
sig { returns(::RBI::Method) }
|
1916
|
+
def node; end
|
1917
|
+
|
1918
|
+
# source://tapioca//lib/tapioca/gem/events.rb#118
|
1919
|
+
sig { returns(T::Array[[::Symbol, ::String]]) }
|
1920
|
+
def parameters; end
|
1921
|
+
|
1922
|
+
# source://tapioca//lib/tapioca/gem/events.rb#115
|
1923
|
+
sig { returns(T.untyped) }
|
1924
|
+
def signature; end
|
1925
|
+
end
|
1926
|
+
|
1927
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
1928
|
+
#
|
1929
|
+
# source://tapioca//lib/tapioca/gem/events.rb#57
|
1930
|
+
class Tapioca::Gem::NodeAdded < ::Tapioca::Gem::Event
|
1931
|
+
abstract!
|
1932
|
+
|
1933
|
+
# source://tapioca//lib/tapioca/gem/events.rb#70
|
1934
|
+
sig { params(symbol: ::String, constant: ::Module).void }
|
1935
|
+
def initialize(symbol, constant); end
|
1936
|
+
|
1937
|
+
# source://tapioca//lib/tapioca/gem/events.rb#67
|
1938
|
+
sig { returns(::Module) }
|
1939
|
+
def constant; end
|
1940
|
+
|
1941
|
+
# source://tapioca//lib/tapioca/gem/events.rb#64
|
1942
|
+
sig { returns(::String) }
|
1943
|
+
def symbol; end
|
1944
|
+
end
|
1945
|
+
|
1946
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#6
|
1947
|
+
class Tapioca::Gem::Pipeline
|
1948
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
1949
|
+
include ::Tapioca::Runtime::Reflection
|
1950
|
+
include ::Tapioca::SorbetHelper
|
1951
|
+
include ::Tapioca::RBIHelper
|
1952
|
+
|
1953
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#17
|
1954
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void }
|
1955
|
+
def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end
|
1956
|
+
|
1957
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#48
|
1958
|
+
sig { returns(::RBI::Tree) }
|
1959
|
+
def compile; end
|
1960
|
+
|
1961
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#119
|
1962
|
+
sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) }
|
1963
|
+
def constant_in_gem?(name); end
|
1964
|
+
|
1965
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#14
|
1966
|
+
sig { returns(::Tapioca::Gemfile::GemSpec) }
|
1967
|
+
def gem; end
|
1968
|
+
|
1969
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#137
|
1970
|
+
sig { params(method: ::UnboundMethod).returns(T::Boolean) }
|
1971
|
+
def method_in_gem?(method); end
|
1972
|
+
|
1973
|
+
# Helpers
|
1974
|
+
#
|
1975
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#147
|
1976
|
+
sig { params(constant: ::Module).returns(T.nilable(::String)) }
|
1977
|
+
def name_of(constant); end
|
1978
|
+
|
1979
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#71
|
1980
|
+
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void }
|
1981
|
+
def push_const(symbol, constant, node); end
|
1982
|
+
|
1983
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#61
|
1984
|
+
sig { params(symbol: ::String, constant: ::BasicObject).void }
|
1985
|
+
def push_constant(symbol, constant); end
|
1986
|
+
|
1987
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#66
|
1988
|
+
sig { params(symbol: ::String, constant: ::Module).void }
|
1989
|
+
def push_foreign_constant(symbol, constant); end
|
1990
|
+
|
1991
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#85
|
1992
|
+
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
|
1993
|
+
def push_foreign_scope(symbol, constant, node); end
|
1994
|
+
|
1995
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#99
|
1996
|
+
sig do
|
1997
|
+
params(
|
1998
|
+
symbol: ::String,
|
1999
|
+
constant: ::Module,
|
2000
|
+
method: ::UnboundMethod,
|
2001
|
+
node: ::RBI::Method,
|
2002
|
+
signature: T.untyped,
|
2003
|
+
parameters: T::Array[[::Symbol, ::String]]
|
2004
|
+
).void
|
2005
|
+
end
|
2006
|
+
def push_method(symbol, constant, method, node, signature, parameters); end
|
2007
|
+
|
2008
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#78
|
2009
|
+
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
|
2010
|
+
def push_scope(symbol, constant, node); end
|
2011
|
+
|
2012
|
+
# Events handling
|
2013
|
+
#
|
2014
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#56
|
2015
|
+
sig { params(symbol: ::String).void }
|
2016
|
+
def push_symbol(symbol); end
|
2017
|
+
|
2018
|
+
# Constants and properties filtering
|
2019
|
+
#
|
2020
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#106
|
2021
|
+
sig { params(symbol_name: ::String).returns(T::Boolean) }
|
2022
|
+
def symbol_in_payload?(symbol_name); end
|
2023
|
+
|
2024
|
+
private
|
2025
|
+
|
2026
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#440
|
2027
|
+
sig { params(name: ::String).void }
|
2028
|
+
def add_to_alias_namespace(name); end
|
2029
|
+
|
2030
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#445
|
2031
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2032
|
+
def alias_namespaced?(name); end
|
2033
|
+
|
2034
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#244
|
2035
|
+
sig { params(name: ::String, constant: ::Module).void }
|
2036
|
+
def compile_alias(name, constant); end
|
2037
|
+
|
2038
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#230
|
2039
|
+
sig { params(symbol: ::String, constant: ::BasicObject).void }
|
2040
|
+
def compile_constant(symbol, constant); end
|
2041
|
+
|
2042
|
+
# Compiling
|
2043
|
+
#
|
2044
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#219
|
2045
|
+
sig { params(symbol: ::String, constant: ::Module).void }
|
2046
|
+
def compile_foreign_constant(symbol, constant); end
|
2047
|
+
|
2048
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#298
|
2049
|
+
sig { params(name: ::String, constant: ::Module).void }
|
2050
|
+
def compile_module(name, constant); end
|
2051
|
+
|
2052
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#265
|
2053
|
+
sig { params(name: ::String, value: ::BasicObject).void }
|
2054
|
+
def compile_object(name, value); end
|
2055
|
+
|
2056
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#309
|
2057
|
+
sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) }
|
2058
|
+
def compile_scope(name, constant); end
|
2059
|
+
|
2060
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#323
|
2061
|
+
sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) }
|
2062
|
+
def compile_superclass(constant); end
|
2063
|
+
|
2064
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#421
|
2065
|
+
sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) }
|
2066
|
+
def defined_in_gem?(constant, strict: T.unsafe(nil)); end
|
2067
|
+
|
2068
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#177
|
2069
|
+
sig { params(event: ::Tapioca::Gem::Event).void }
|
2070
|
+
def dispatch(event); end
|
2071
|
+
|
2072
|
+
# Helpers
|
2073
|
+
#
|
2074
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#464
|
2075
|
+
sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) }
|
2076
|
+
def generic_name_of(constant); end
|
2077
|
+
|
2078
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#433
|
2079
|
+
sig { params(constant: ::Module).returns(T::Set[::String]) }
|
2080
|
+
def get_file_candidates(constant); end
|
2081
|
+
|
2082
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#162
|
2083
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
|
2084
|
+
def load_bootstrap_symbols(gem); end
|
2085
|
+
|
2086
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#480
|
2087
|
+
sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) }
|
2088
|
+
def name_of_proxy_target(constant, class_name); end
|
2089
|
+
|
2090
|
+
# Events handling
|
2091
|
+
#
|
2092
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#172
|
2093
|
+
sig { returns(::Tapioca::Gem::Event) }
|
2094
|
+
def next_event; end
|
2095
|
+
|
2096
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#200
|
2097
|
+
sig { params(event: ::Tapioca::Gem::ConstantFound).void }
|
2098
|
+
def on_constant(event); end
|
2099
|
+
|
2100
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#212
|
2101
|
+
sig { params(event: ::Tapioca::Gem::NodeAdded).void }
|
2102
|
+
def on_node(event); end
|
2103
|
+
|
2104
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#191
|
2105
|
+
sig { params(event: ::Tapioca::Gem::SymbolFound).void }
|
2106
|
+
def on_symbol(event); end
|
2107
|
+
|
2108
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#452
|
2109
|
+
sig { params(name: ::String).void }
|
2110
|
+
def seen!(name); end
|
2111
|
+
|
2112
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#457
|
2113
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2114
|
+
def seen?(name); end
|
2115
|
+
|
2116
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#391
|
2117
|
+
sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
|
2118
|
+
def skip_alias?(name, constant); end
|
2119
|
+
|
2120
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#379
|
2121
|
+
sig { params(name: ::String, constant: T.anything).returns(T::Boolean) }
|
2122
|
+
def skip_constant?(name, constant); end
|
2123
|
+
|
2124
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#408
|
2125
|
+
sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
|
2126
|
+
def skip_foreign_constant?(name, constant); end
|
2127
|
+
|
2128
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#413
|
2129
|
+
sig { params(name: ::String, constant: ::Module).returns(T::Boolean) }
|
2130
|
+
def skip_module?(name, constant); end
|
2131
|
+
|
2132
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#400
|
2133
|
+
sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) }
|
2134
|
+
def skip_object?(name, constant); end
|
2135
|
+
|
2136
|
+
# Constants and properties filtering
|
2137
|
+
#
|
2138
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#374
|
2139
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2140
|
+
def skip_symbol?(name); end
|
2141
|
+
end
|
2142
|
+
|
2143
|
+
# this looks something like:
|
2144
|
+
# "(eval at /path/to/file.rb:123)"
|
2145
|
+
# and we are just interested in the "/path/to/file.rb" part
|
2146
|
+
#
|
2147
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#116
|
2148
|
+
Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp)
|
2149
|
+
|
2150
|
+
# source://tapioca//lib/tapioca/gem/pipeline.rb#11
|
2151
|
+
Tapioca::Gem::Pipeline::IGNORED_SYMBOLS = T.let(T.unsafe(nil), Array)
|
2152
|
+
|
2153
|
+
# source://tapioca//lib/tapioca/gem/events.rb#90
|
2154
|
+
class Tapioca::Gem::ScopeNodeAdded < ::Tapioca::Gem::NodeAdded
|
2155
|
+
# source://tapioca//lib/tapioca/gem/events.rb#97
|
2156
|
+
sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void }
|
2157
|
+
def initialize(symbol, constant, node); end
|
2158
|
+
|
2159
|
+
# source://tapioca//lib/tapioca/gem/events.rb#94
|
2160
|
+
sig { returns(::RBI::Scope) }
|
2161
|
+
def node; end
|
2162
|
+
end
|
2163
|
+
|
2164
|
+
# source://tapioca//lib/tapioca/gem/events.rb#13
|
2165
|
+
class Tapioca::Gem::SymbolFound < ::Tapioca::Gem::Event
|
2166
|
+
# source://tapioca//lib/tapioca/gem/events.rb#20
|
2167
|
+
sig { params(symbol: ::String).void }
|
2168
|
+
def initialize(symbol); end
|
2169
|
+
|
2170
|
+
# source://tapioca//lib/tapioca/gem/events.rb#17
|
2171
|
+
sig { returns(::String) }
|
2172
|
+
def symbol; end
|
2173
|
+
end
|
2174
|
+
|
2175
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#5
|
2176
|
+
module Tapioca::GemHelper
|
2177
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#9
|
2178
|
+
sig { params(app_dir: T.any(::Pathname, ::String), full_gem_path: ::String).returns(T::Boolean) }
|
2179
|
+
def gem_in_app_dir?(app_dir, full_gem_path); end
|
2180
|
+
|
2181
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#17
|
2182
|
+
sig { params(full_gem_path: ::String).returns(T::Boolean) }
|
2183
|
+
def gem_in_bundle_path?(full_gem_path); end
|
2184
|
+
|
2185
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#22
|
2186
|
+
sig { params(full_gem_path: ::String).returns(T::Boolean) }
|
2187
|
+
def gem_in_ruby_path?(full_gem_path); end
|
2188
|
+
|
2189
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#27
|
2190
|
+
sig { params(path: T.any(::Pathname, ::String)).returns(::String) }
|
2191
|
+
def to_realpath(path); end
|
2192
|
+
|
2193
|
+
private
|
2194
|
+
|
2195
|
+
# source://tapioca//lib/tapioca/helpers/gem_helper.rb#36
|
2196
|
+
sig { params(path: T.any(::Pathname, ::String), dir: T.any(::Pathname, ::String)).returns(T::Boolean) }
|
2197
|
+
def path_in_dir?(path, dir); end
|
2198
|
+
end
|
2199
|
+
|
2200
|
+
# source://tapioca//lib/tapioca/gem_info.rb#5
|
2201
|
+
class Tapioca::GemInfo < ::T::Struct
|
2202
|
+
const :name, ::String
|
2203
|
+
const :version, ::Gem::Version
|
2204
|
+
|
2205
|
+
class << self
|
2206
|
+
# source://tapioca//lib/tapioca/gem_info.rb#13
|
2207
|
+
sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) }
|
2208
|
+
def from_spec(spec); end
|
2209
|
+
|
2210
|
+
# source://sorbet-runtime/0.5.11481/lib/types/struct.rb#13
|
2211
|
+
def inherited(s); end
|
2212
|
+
end
|
2213
|
+
end
|
2214
|
+
|
2215
|
+
# source://tapioca//lib/tapioca/gemfile.rb#7
|
2216
|
+
class Tapioca::Gemfile
|
2217
|
+
# source://tapioca//lib/tapioca/gemfile.rb#27
|
2218
|
+
sig { params(excluded_gems: T::Array[::String]).void }
|
2219
|
+
def initialize(excluded_gems); end
|
2220
|
+
|
2221
|
+
# source://tapioca//lib/tapioca/gemfile.rb#18
|
2222
|
+
sig { returns(::Bundler::Definition) }
|
2223
|
+
def definition; end
|
2224
|
+
|
2225
|
+
# source://tapioca//lib/tapioca/gemfile.rb#21
|
2226
|
+
sig { returns(T::Array[::Tapioca::Gemfile::GemSpec]) }
|
2227
|
+
def dependencies; end
|
2228
|
+
|
2229
|
+
# source://tapioca//lib/tapioca/gemfile.rb#40
|
2230
|
+
sig { params(gem_name: ::String).returns(T.nilable(::Tapioca::Gemfile::GemSpec)) }
|
2231
|
+
def gem(gem_name); end
|
2232
|
+
|
2233
|
+
# source://tapioca//lib/tapioca/gemfile.rb#24
|
2234
|
+
sig { returns(T::Array[::String]) }
|
2235
|
+
def missing_specs; end
|
2236
|
+
|
2237
|
+
# source://tapioca//lib/tapioca/gemfile.rb#45
|
2238
|
+
sig { void }
|
2239
|
+
def require_bundle; end
|
2240
|
+
|
2241
|
+
private
|
2242
|
+
|
2243
|
+
# source://tapioca//lib/tapioca/gemfile.rb#92
|
2244
|
+
sig { returns(::String) }
|
2245
|
+
def dir; end
|
2246
|
+
|
2247
|
+
# source://tapioca//lib/tapioca/gemfile.rb#54
|
2248
|
+
sig { returns(::File) }
|
2249
|
+
def gemfile; end
|
2250
|
+
|
2251
|
+
# source://tapioca//lib/tapioca/gemfile.rb#87
|
2252
|
+
sig { returns(T::Array[::Symbol]) }
|
2253
|
+
def groups; end
|
2254
|
+
|
2255
|
+
# source://tapioca//lib/tapioca/gemfile.rb#57
|
2256
|
+
sig { returns([T::Array[::Tapioca::Gemfile::GemSpec], T::Array[::String]]) }
|
2257
|
+
def load_dependencies; end
|
2258
|
+
|
2259
|
+
# @return [File]
|
2260
|
+
#
|
2261
|
+
# source://tapioca//lib/tapioca/gemfile.rb#54
|
2262
|
+
def lockfile; end
|
2263
|
+
|
2264
|
+
# source://tapioca//lib/tapioca/gemfile.rb#68
|
2265
|
+
sig { returns([T::Enumerable[T.any(::Bundler::StubSpecification, ::Gem::Specification)], T::Array[::String]]) }
|
2266
|
+
def materialize_deps; end
|
2267
|
+
|
2268
|
+
# source://tapioca//lib/tapioca/gemfile.rb#82
|
2269
|
+
sig { returns(::Bundler::Runtime) }
|
2270
|
+
def runtime; end
|
2271
|
+
end
|
2272
|
+
|
2273
|
+
# source://tapioca//lib/tapioca/gemfile.rb#96
|
2274
|
+
class Tapioca::Gemfile::GemSpec
|
2275
|
+
include ::Tapioca::GemHelper
|
2276
|
+
|
2277
|
+
# source://tapioca//lib/tapioca/gemfile.rb#136
|
2278
|
+
sig { params(spec: T.any(::Bundler::StubSpecification, ::Gem::Specification)).void }
|
2279
|
+
def initialize(spec); end
|
2280
|
+
|
2281
|
+
# source://tapioca//lib/tapioca/gemfile.rb#146
|
2282
|
+
sig { params(other: ::BasicObject).returns(T::Boolean) }
|
2283
|
+
def ==(other); end
|
2284
|
+
|
2285
|
+
# source://tapioca//lib/tapioca/gemfile.rb#171
|
2286
|
+
sig { params(path: ::String).returns(T::Boolean) }
|
2287
|
+
def contains_path?(path); end
|
2288
|
+
|
2289
|
+
# source://tapioca//lib/tapioca/gemfile.rb#161
|
2290
|
+
sig { returns(T::Array[::Gem::Dependency]) }
|
2291
|
+
def dependencies; end
|
2292
|
+
|
2293
|
+
# source://tapioca//lib/tapioca/gemfile.rb#201
|
2294
|
+
sig { returns(T::Boolean) }
|
2295
|
+
def export_rbi_files?; end
|
2296
|
+
|
2297
|
+
# source://tapioca//lib/tapioca/gemfile.rb#196
|
2298
|
+
sig { returns(T::Array[::String]) }
|
2299
|
+
def exported_rbi_files; end
|
2300
|
+
|
2301
|
+
# source://tapioca//lib/tapioca/gemfile.rb#206
|
2302
|
+
sig { returns(::RBI::MergeTree) }
|
2303
|
+
def exported_rbi_tree; end
|
2304
|
+
|
2305
|
+
# source://tapioca//lib/tapioca/gemfile.rb#133
|
2306
|
+
sig { returns(T::Array[::Pathname]) }
|
2307
|
+
def files; end
|
2308
|
+
|
2309
|
+
# source://tapioca//lib/tapioca/gemfile.rb#130
|
2310
|
+
sig { returns(::String) }
|
2311
|
+
def full_gem_path; end
|
2312
|
+
|
2313
|
+
# source://tapioca//lib/tapioca/gemfile.rb#151
|
2314
|
+
sig { params(gemfile_dir: ::String).returns(T::Boolean) }
|
2315
|
+
def ignore?(gemfile_dir); end
|
2316
|
+
|
2317
|
+
# source://tapioca//lib/tapioca/gemfile.rb#156
|
2318
|
+
sig { returns(::String) }
|
2319
|
+
def name; end
|
2320
|
+
|
2321
|
+
# source://tapioca//lib/tapioca/gemfile.rb#180
|
2322
|
+
sig { void }
|
2323
|
+
def parse_yard_docs; end
|
2324
|
+
|
2325
|
+
# source://tapioca//lib/tapioca/gemfile.rb#166
|
2326
|
+
sig { returns(::String) }
|
2327
|
+
def rbi_file_name; end
|
2328
|
+
|
2329
|
+
# source://tapioca//lib/tapioca/gemfile.rb#218
|
2330
|
+
sig { params(file: ::Pathname).returns(::Pathname) }
|
2331
|
+
def relative_path_for(file); end
|
2332
|
+
|
2333
|
+
# @return [String]
|
2334
|
+
#
|
2335
|
+
# source://tapioca//lib/tapioca/gemfile.rb#130
|
2336
|
+
def version; end
|
2337
|
+
|
2338
|
+
private
|
2339
|
+
|
2340
|
+
# source://tapioca//lib/tapioca/gemfile.rb#229
|
2341
|
+
sig { returns(T::Array[::Pathname]) }
|
2342
|
+
def collect_files; end
|
2343
|
+
|
2344
|
+
# source://tapioca//lib/tapioca/gemfile.rb#244
|
2345
|
+
sig { returns(T.nilable(T::Boolean)) }
|
2346
|
+
def default_gem?; end
|
2347
|
+
|
2348
|
+
# source://tapioca//lib/tapioca/gemfile.rb#303
|
2349
|
+
sig { returns(T::Boolean) }
|
2350
|
+
def gem_ignored?; end
|
2351
|
+
|
2352
|
+
# source://tapioca//lib/tapioca/gemfile.rb#282
|
2353
|
+
sig { params(path: ::String).returns(T::Boolean) }
|
2354
|
+
def has_parent_gemspec?(path); end
|
2355
|
+
|
2356
|
+
# source://tapioca//lib/tapioca/gemfile.rb#249
|
2357
|
+
sig { returns(::Regexp) }
|
2358
|
+
def require_paths_prefix_matcher; end
|
2359
|
+
|
2360
|
+
# source://tapioca//lib/tapioca/gemfile.rb#261
|
2361
|
+
sig { params(file: ::String).returns(::Pathname) }
|
2362
|
+
def resolve_to_ruby_lib_dir(file); end
|
2363
|
+
|
2364
|
+
# source://tapioca//lib/tapioca/gemfile.rb#275
|
2365
|
+
sig { returns(::String) }
|
2366
|
+
def version_string; end
|
2367
|
+
|
2368
|
+
class << self
|
2369
|
+
# source://tapioca//lib/tapioca/gemfile.rb#104
|
2370
|
+
sig { returns(T::Hash[::String, ::Tapioca::Gemfile::GemSpec]) }
|
2371
|
+
def spec_lookup_by_file_path; end
|
2372
|
+
end
|
2373
|
+
end
|
2374
|
+
|
2375
|
+
# source://tapioca//lib/tapioca/gemfile.rb#116
|
2376
|
+
Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array)
|
2377
|
+
|
2378
|
+
# source://tapioca//lib/tapioca/gemfile.rb#10
|
2379
|
+
Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) }
|
2380
|
+
|
2381
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#5
|
2382
|
+
module Tapioca::Loaders; end
|
2383
|
+
|
2384
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#6
|
2385
|
+
class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader
|
2386
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#38
|
2387
|
+
sig do
|
2388
|
+
params(
|
2389
|
+
tapioca_path: ::String,
|
2390
|
+
eager_load: T::Boolean,
|
2391
|
+
app_root: ::String,
|
2392
|
+
halt_upon_load_error: T::Boolean
|
2393
|
+
).void
|
2394
|
+
end
|
2395
|
+
def initialize(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
|
2396
|
+
|
2397
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#27
|
2398
|
+
sig { override.void }
|
2399
|
+
def load; end
|
2400
|
+
|
2401
|
+
protected
|
2402
|
+
|
2403
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#81
|
2404
|
+
sig { void }
|
2405
|
+
def load_application; end
|
2406
|
+
|
2407
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#63
|
2408
|
+
sig { void }
|
2409
|
+
def load_dsl_compilers; end
|
2410
|
+
|
2411
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#48
|
2412
|
+
sig { void }
|
2413
|
+
def load_dsl_extensions; end
|
2414
|
+
|
2415
|
+
class << self
|
2416
|
+
# source://tapioca//lib/tapioca/loaders/dsl.rb#15
|
2417
|
+
sig do
|
2418
|
+
params(
|
2419
|
+
tapioca_path: ::String,
|
2420
|
+
eager_load: T::Boolean,
|
2421
|
+
app_root: ::String,
|
2422
|
+
halt_upon_load_error: T::Boolean
|
2423
|
+
).void
|
2424
|
+
end
|
2425
|
+
def load_application(tapioca_path:, eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
|
2426
|
+
end
|
2427
|
+
end
|
2428
|
+
|
2429
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#6
|
2430
|
+
class Tapioca::Loaders::Gem < ::Tapioca::Loaders::Loader
|
2431
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#49
|
2432
|
+
sig do
|
2433
|
+
params(
|
2434
|
+
bundle: ::Tapioca::Gemfile,
|
2435
|
+
prerequire: T.nilable(::String),
|
2436
|
+
postrequire: ::String,
|
2437
|
+
default_command: ::String,
|
2438
|
+
halt_upon_load_error: T::Boolean
|
2439
|
+
).void
|
2440
|
+
end
|
2441
|
+
def initialize(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end
|
2442
|
+
|
2443
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#34
|
2444
|
+
sig { override.void }
|
2445
|
+
def load; end
|
2446
|
+
|
2447
|
+
protected
|
2448
|
+
|
2449
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#80
|
2450
|
+
sig { params(file: ::String, error: ::LoadError).void }
|
2451
|
+
def explain_failed_require(file, error); end
|
2452
|
+
|
2453
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#60
|
2454
|
+
sig { void }
|
2455
|
+
def require_gem_file; end
|
2456
|
+
|
2457
|
+
class << self
|
2458
|
+
# source://tapioca//lib/tapioca/loaders/gem.rb#21
|
2459
|
+
sig do
|
2460
|
+
params(
|
2461
|
+
bundle: ::Tapioca::Gemfile,
|
2462
|
+
prerequire: T.nilable(::String),
|
2463
|
+
postrequire: ::String,
|
2464
|
+
default_command: ::String,
|
2465
|
+
halt_upon_load_error: T::Boolean
|
2466
|
+
).void
|
2467
|
+
end
|
2468
|
+
def load_application(bundle:, prerequire:, postrequire:, default_command:, halt_upon_load_error:); end
|
2469
|
+
end
|
2470
|
+
end
|
2471
|
+
|
2472
|
+
# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below.
|
2473
|
+
#
|
2474
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#6
|
2475
|
+
class Tapioca::Loaders::Loader
|
2476
|
+
include ::Thor::Base
|
2477
|
+
include ::Thor::Invocation
|
2478
|
+
include ::Thor::Shell
|
2479
|
+
include ::Tapioca::CliHelper
|
2480
|
+
include ::Tapioca::GemHelper
|
2481
|
+
extend ::Thor::Base::ClassMethods
|
2482
|
+
extend ::Thor::Invocation::ClassMethods
|
2483
|
+
|
2484
|
+
abstract!
|
2485
|
+
|
2486
|
+
# @abstract
|
2487
|
+
#
|
2488
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#17
|
2489
|
+
sig { abstract.void }
|
2490
|
+
def load; end
|
2491
|
+
|
2492
|
+
private
|
2493
|
+
|
2494
|
+
# Rails 7.2 renamed `eager_load_paths` to `all_eager_load_paths`, which maintains the same original functionality.
|
2495
|
+
# The `eager_load_paths` method still exists, but doesn't return all paths anymore and causes Tapioca to miss some
|
2496
|
+
# engine paths. The following commit is the change:
|
2497
|
+
# https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664
|
2498
|
+
#
|
2499
|
+
# @param engine [T.class_of(Rails::Engine)]
|
2500
|
+
# @return [Array<String>]
|
2501
|
+
#
|
2502
|
+
# source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257
|
2503
|
+
def eager_load_paths(*args, **_arg1, &blk); end
|
2504
|
+
|
2505
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#188
|
2506
|
+
sig { void }
|
2507
|
+
def eager_load_rails_app; end
|
2508
|
+
|
2509
|
+
# @return [Array<T.class_of(Rails::Engine)>]
|
2510
|
+
#
|
2511
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#167
|
2512
|
+
def engines; end
|
2513
|
+
|
2514
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#29
|
2515
|
+
sig do
|
2516
|
+
params(
|
2517
|
+
gemfile: ::Tapioca::Gemfile,
|
2518
|
+
initialize_file: T.nilable(::String),
|
2519
|
+
require_file: T.nilable(::String),
|
2520
|
+
halt_upon_load_error: T::Boolean
|
2521
|
+
).void
|
2522
|
+
end
|
2523
|
+
def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end
|
2524
|
+
|
2525
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#125
|
2526
|
+
sig { void }
|
2527
|
+
def load_engines_in_classic_mode; end
|
2528
|
+
|
2529
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#103
|
2530
|
+
sig { void }
|
2531
|
+
def load_engines_in_zeitwerk_mode; end
|
2532
|
+
|
2533
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#49
|
2534
|
+
sig do
|
2535
|
+
params(
|
2536
|
+
environment_load: T::Boolean,
|
2537
|
+
eager_load: T::Boolean,
|
2538
|
+
app_root: ::String,
|
2539
|
+
halt_upon_load_error: T::Boolean
|
2540
|
+
).void
|
2541
|
+
end
|
2542
|
+
def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end
|
2543
|
+
|
2544
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#78
|
2545
|
+
sig { void }
|
2546
|
+
def load_rails_engines; end
|
2547
|
+
|
2548
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#209
|
2549
|
+
sig { params(file: T.nilable(::String)).void }
|
2550
|
+
def require_helper(file); end
|
2551
|
+
|
2552
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#92
|
2553
|
+
def run_initializers; end
|
2554
|
+
|
2555
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#181
|
2556
|
+
sig { params(path: ::String).void }
|
2557
|
+
def safe_require(path); end
|
2558
|
+
|
2559
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#150
|
2560
|
+
sig { params(blk: T.proc.void).void }
|
2561
|
+
def with_rails_application(&blk); end
|
2562
|
+
|
2563
|
+
# source://tapioca//lib/tapioca/loaders/loader.rb#143
|
2564
|
+
sig { returns(T::Boolean) }
|
2565
|
+
def zeitwerk_mode?; end
|
2566
|
+
end
|
2567
|
+
|
2568
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#5
|
2569
|
+
module Tapioca::RBIFilesHelper
|
2570
|
+
requires_ancestor { Tapioca::SorbetHelper }
|
2571
|
+
requires_ancestor { Thor::Shell }
|
2572
|
+
|
2573
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#48
|
2574
|
+
sig do
|
2575
|
+
params(
|
2576
|
+
index: ::RBI::Index,
|
2577
|
+
shim_rbi_dir: ::String,
|
2578
|
+
todo_rbi_file: ::String
|
2579
|
+
).returns(T::Hash[::String, T::Array[::RBI::Node]])
|
2580
|
+
end
|
2581
|
+
def duplicated_nodes_from_index(index, shim_rbi_dir:, todo_rbi_file:); end
|
2582
|
+
|
2583
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#13
|
2584
|
+
sig { params(index: ::RBI::Index, kind: ::String, file: ::String).void }
|
2585
|
+
def index_rbi(index, kind, file); end
|
2586
|
+
|
2587
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#25
|
2588
|
+
sig { params(index: ::RBI::Index, kind: ::String, dir: ::String, number_of_workers: T.nilable(::Integer)).void }
|
2589
|
+
def index_rbis(index, kind, dir, number_of_workers:); end
|
2590
|
+
|
2591
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#65
|
2592
|
+
sig { params(loc: ::RBI::Loc, path_prefix: T.nilable(::String)).returns(::String) }
|
2593
|
+
def location_to_payload_url(loc, path_prefix:); end
|
2594
|
+
|
2595
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#86
|
2596
|
+
sig do
|
2597
|
+
params(
|
2598
|
+
command: ::String,
|
2599
|
+
gem_dir: ::String,
|
2600
|
+
dsl_dir: ::String,
|
2601
|
+
auto_strictness: T::Boolean,
|
2602
|
+
gems: T::Array[::Tapioca::Gemfile::GemSpec],
|
2603
|
+
compilers: T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]
|
2604
|
+
).void
|
2605
|
+
end
|
2606
|
+
def validate_rbi_files(command:, gem_dir:, dsl_dir:, auto_strictness:, gems: T.unsafe(nil), compilers: T.unsafe(nil)); end
|
2607
|
+
|
2608
|
+
private
|
2609
|
+
|
2610
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#223
|
2611
|
+
sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) }
|
2612
|
+
def extract_empty_scopes(nodes); end
|
2613
|
+
|
2614
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#228
|
2615
|
+
sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) }
|
2616
|
+
def extract_methods_and_attrs(nodes); end
|
2617
|
+
|
2618
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#238
|
2619
|
+
sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) }
|
2620
|
+
def extract_mixins(nodes); end
|
2621
|
+
|
2622
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#248
|
2623
|
+
sig do
|
2624
|
+
params(
|
2625
|
+
nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)]
|
2626
|
+
).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)])
|
2627
|
+
end
|
2628
|
+
def extract_nodes_with_sigs(nodes); end
|
2629
|
+
|
2630
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#216
|
2631
|
+
sig do
|
2632
|
+
params(
|
2633
|
+
nodes: T::Array[::RBI::Node],
|
2634
|
+
shim_rbi_dir: ::String,
|
2635
|
+
todo_rbi_file: ::String
|
2636
|
+
).returns(T::Array[::RBI::Node])
|
2637
|
+
end
|
2638
|
+
def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end
|
2639
|
+
|
2640
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#280
|
2641
|
+
sig { params(path: ::String).returns(::String) }
|
2642
|
+
def gem_name_from_rbi_path(path); end
|
2643
|
+
|
2644
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#155
|
2645
|
+
sig { params(index: ::RBI::Index, files: T::Array[::String], number_of_workers: T.nilable(::Integer)).void }
|
2646
|
+
def parse_and_index_files(index, files, number_of_workers:); end
|
2647
|
+
|
2648
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#171
|
2649
|
+
sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) }
|
2650
|
+
def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end
|
2651
|
+
|
2652
|
+
# source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#253
|
2653
|
+
sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void }
|
2654
|
+
def update_gem_rbis_strictnesses(errors, gem_dir); end
|
2655
|
+
end
|
2656
|
+
|
2657
|
+
# source://tapioca//lib/tapioca/rbi_formatter.rb#5
|
2658
|
+
class Tapioca::RBIFormatter < ::RBI::Formatter
|
2659
|
+
# source://tapioca//lib/tapioca/rbi_formatter.rb#24
|
2660
|
+
sig { params(file: ::RBI::File).void }
|
2661
|
+
def write_empty_body_comment!(file); end
|
2662
|
+
|
2663
|
+
# source://tapioca//lib/tapioca/rbi_formatter.rb#15
|
2664
|
+
sig { params(file: ::RBI::File, command: ::String, reason: T.nilable(::String)).void }
|
2665
|
+
def write_header!(file, command, reason: T.unsafe(nil)); end
|
2666
|
+
end
|
2667
|
+
|
2668
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#5
|
2669
|
+
module Tapioca::RBIHelper
|
2670
|
+
include ::Tapioca::SorbetHelper
|
2671
|
+
extend ::Tapioca::SorbetHelper
|
2672
|
+
extend ::Tapioca::RBIHelper
|
2673
|
+
|
2674
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#91
|
2675
|
+
sig { params(type: ::String).returns(::String) }
|
2676
|
+
def as_nilable_type(type); end
|
2677
|
+
|
2678
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100
|
2679
|
+
sig { params(type: ::String).returns(::String) }
|
2680
|
+
def as_non_nilable_type(type); end
|
2681
|
+
|
2682
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72
|
2683
|
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
|
2684
|
+
def create_block_param(name, type:); end
|
2685
|
+
|
2686
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#62
|
2687
|
+
sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
|
2688
|
+
def create_kw_opt_param(name, type:, default:); end
|
2689
|
+
|
2690
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#57
|
2691
|
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
|
2692
|
+
def create_kw_param(name, type:); end
|
2693
|
+
|
2694
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#67
|
2695
|
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
|
2696
|
+
def create_kw_rest_param(name, type:); end
|
2697
|
+
|
2698
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#47
|
2699
|
+
sig { params(name: ::String, type: ::String, default: ::String).returns(::RBI::TypedParam) }
|
2700
|
+
def create_opt_param(name, type:, default:); end
|
2701
|
+
|
2702
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#42
|
2703
|
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
|
2704
|
+
def create_param(name, type:); end
|
2705
|
+
|
2706
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#52
|
2707
|
+
sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) }
|
2708
|
+
def create_rest_param(name, type:); end
|
2709
|
+
|
2710
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#77
|
2711
|
+
sig { params(param: ::RBI::Param, type: ::String).returns(::RBI::TypedParam) }
|
2712
|
+
def create_typed_param(param, type); end
|
2713
|
+
|
2714
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#82
|
2715
|
+
sig { params(sig_string: ::String).returns(::String) }
|
2716
|
+
def sanitize_signature_types(sig_string); end
|
2717
|
+
|
2718
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109
|
2719
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2720
|
+
def valid_method_name?(name); end
|
2721
|
+
|
2722
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#123
|
2723
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
2724
|
+
def valid_parameter_name?(name); end
|
2725
|
+
|
2726
|
+
class << self
|
2727
|
+
# source://tapioca//lib/tapioca/helpers/rbi_helper.rb#23
|
2728
|
+
sig do
|
2729
|
+
params(
|
2730
|
+
type: ::String,
|
2731
|
+
variance: ::Symbol,
|
2732
|
+
fixed: T.nilable(::String),
|
2733
|
+
upper: T.nilable(::String),
|
2734
|
+
lower: T.nilable(::String)
|
2735
|
+
).returns(::String)
|
2736
|
+
end
|
2737
|
+
def serialize_type_variable(type, variance, fixed, upper, lower); end
|
2738
|
+
end
|
2739
|
+
end
|
2740
|
+
|
2741
|
+
# source://tapioca//lib/tapioca/repo_index.rb#5
|
2742
|
+
class Tapioca::RepoIndex
|
2743
|
+
# source://tapioca//lib/tapioca/repo_index.rb#26
|
2744
|
+
sig { void }
|
2745
|
+
def initialize; end
|
2746
|
+
|
2747
|
+
# source://tapioca//lib/tapioca/repo_index.rb#31
|
2748
|
+
sig { params(gem_name: ::String).void }
|
2749
|
+
def <<(gem_name); end
|
2750
|
+
|
2751
|
+
# source://tapioca//lib/tapioca/repo_index.rb#36
|
2752
|
+
sig { returns(T::Enumerable[::String]) }
|
2753
|
+
def gems; end
|
2754
|
+
|
2755
|
+
# source://tapioca//lib/tapioca/repo_index.rb#41
|
2756
|
+
sig { params(gem_name: ::String).returns(T::Boolean) }
|
2757
|
+
def has_gem?(gem_name); end
|
2758
|
+
|
2759
|
+
class << self
|
2760
|
+
# source://tapioca//lib/tapioca/repo_index.rb#18
|
2761
|
+
sig { params(hash: T::Hash[::String, T::Hash[T.untyped, T.untyped]]).returns(Tapioca::RepoIndex) }
|
2762
|
+
def from_hash(hash); end
|
2763
|
+
|
2764
|
+
# source://tapioca//lib/tapioca/repo_index.rb#13
|
2765
|
+
sig { params(json: ::String).returns(Tapioca::RepoIndex) }
|
2766
|
+
def from_json(json); end
|
2767
|
+
end
|
2768
|
+
end
|
2769
|
+
|
2770
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#5
|
2771
|
+
module Tapioca::Runtime; end
|
2772
|
+
|
2773
|
+
# This module should only be included when running versions of Ruby
|
2774
|
+
# older than 3.2. Because the Class#attached_object method is not
|
2775
|
+
# available, it implements finding the attached class of a singleton
|
2776
|
+
# class by iterating through ObjectSpace.
|
2777
|
+
module Tapioca::Runtime::AttachedClassOf
|
2778
|
+
# source://tapioca//lib/tapioca/runtime/attached_class_of_32.rb#14
|
2779
|
+
sig { params(singleton_class: ::Class).returns(T.nilable(::Module)) }
|
2780
|
+
def attached_class_of(singleton_class); end
|
2781
|
+
end
|
2782
|
+
|
2783
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#6
|
2784
|
+
class Tapioca::Runtime::DynamicMixinCompiler
|
2785
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
2786
|
+
include ::Tapioca::Runtime::Reflection
|
2787
|
+
|
2788
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#20
|
2789
|
+
sig { params(constant: ::Module).void }
|
2790
|
+
def initialize(constant); end
|
2791
|
+
|
2792
|
+
# @return [Array<Symbol>]
|
2793
|
+
#
|
2794
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14
|
2795
|
+
def class_attribute_predicates; end
|
2796
|
+
|
2797
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14
|
2798
|
+
sig { returns(T::Array[::Symbol]) }
|
2799
|
+
def class_attribute_readers; end
|
2800
|
+
|
2801
|
+
# @return [Array<Symbol>]
|
2802
|
+
#
|
2803
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#14
|
2804
|
+
def class_attribute_writers; end
|
2805
|
+
|
2806
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#137
|
2807
|
+
sig { params(tree: ::RBI::Tree).void }
|
2808
|
+
def compile_class_attributes(tree); end
|
2809
|
+
|
2810
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#180
|
2811
|
+
sig { params(tree: ::RBI::Tree).returns([T::Array[::Module], T::Array[::Module]]) }
|
2812
|
+
def compile_mixes_in_class_methods(tree); end
|
2813
|
+
|
2814
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11
|
2815
|
+
sig { returns(T::Array[::Module]) }
|
2816
|
+
def dynamic_extends; end
|
2817
|
+
|
2818
|
+
# @return [Array<Module>]
|
2819
|
+
#
|
2820
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#11
|
2821
|
+
def dynamic_includes; end
|
2822
|
+
|
2823
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#132
|
2824
|
+
sig { returns(T::Boolean) }
|
2825
|
+
def empty_attributes?; end
|
2826
|
+
|
2827
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#222
|
2828
|
+
sig { params(qualified_mixin_name: ::String).returns(T::Boolean) }
|
2829
|
+
def filtered_mixin?(qualified_mixin_name); end
|
2830
|
+
|
2831
|
+
# @return [Array<Symbol>]
|
2832
|
+
#
|
2833
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17
|
2834
|
+
def instance_attribute_predicates; end
|
2835
|
+
|
2836
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17
|
2837
|
+
sig { returns(T::Array[::Symbol]) }
|
2838
|
+
def instance_attribute_readers; end
|
2839
|
+
|
2840
|
+
# @return [Array<Symbol>]
|
2841
|
+
#
|
2842
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#17
|
2843
|
+
def instance_attribute_writers; end
|
2844
|
+
|
2845
|
+
# source://tapioca//lib/tapioca/runtime/dynamic_mixin_compiler.rb#215
|
2846
|
+
sig { params(mod: ::Module, dynamic_extends: T::Array[::Module]).returns(T::Boolean) }
|
2847
|
+
def module_included_by_another_dynamic_extend?(mod, dynamic_extends); end
|
2848
|
+
end
|
2849
|
+
|
2850
|
+
# This class is responsible for storing and looking up information related to generic types.
|
2851
|
+
#
|
2852
|
+
# The class stores 2 different kinds of data, in two separate lookup tables:
|
2853
|
+
# 1. a lookup of generic type instances by name: `@generic_instances`
|
2854
|
+
# 2. a lookup of type variable serializer by constant and type variable
|
2855
|
+
# instance: `@type_variables`
|
2856
|
+
#
|
2857
|
+
# By storing the above data, we can cheaply query each constant against this registry
|
2858
|
+
# to see if it declares any generic type variables. This becomes a simple lookup in the
|
2859
|
+
# `@type_variables` hash table with the given constant.
|
2860
|
+
#
|
2861
|
+
# If there is no entry, then we can cheaply know that we can skip generic type
|
2862
|
+
# information generation for this type.
|
2863
|
+
#
|
2864
|
+
# On the other hand, if we get a result, then the result will be a hash of type
|
2865
|
+
# variable to type variable serializers. This allows us to associate type variables
|
2866
|
+
# to the constant names that represent them, easily.
|
2867
|
+
#
|
2868
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#23
|
2869
|
+
module Tapioca::Runtime::GenericTypeRegistry
|
2870
|
+
class << self
|
2871
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#80
|
2872
|
+
sig { params(instance: ::Object).returns(T::Boolean) }
|
2873
|
+
def generic_type_instance?(instance); end
|
2874
|
+
|
2875
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#85
|
2876
|
+
sig { params(constant: ::Module).returns(T.nilable(T::Array[::Tapioca::TypeVariableModule])) }
|
2877
|
+
def lookup_type_variables(constant); end
|
2878
|
+
|
2879
|
+
# This method is responsible for building the name of the instantiated concrete type
|
2880
|
+
# and cloning the given constant so that we can return a type that is the same
|
2881
|
+
# as the current type but is a different instance and has a different name method.
|
2882
|
+
#
|
2883
|
+
# We cache those cloned instances by their name in `@generic_instances`, so that
|
2884
|
+
# we don't keep instantiating a new type every single time it is referenced.
|
2885
|
+
# For example, `[Foo[Integer], Foo[Integer], Foo[Integer], Foo[String]]` will only
|
2886
|
+
# result in 2 clones (1 for `Foo[Integer]` and another for `Foo[String]`) and
|
2887
|
+
# 2 hash lookups (for the other two `Foo[Integer]`s).
|
2888
|
+
#
|
2889
|
+
# This method returns the created or cached clone of the constant.
|
2890
|
+
#
|
2891
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#65
|
2892
|
+
sig { params(constant: T.untyped, types: T.untyped).returns(::Module) }
|
2893
|
+
def register_type(constant, types); end
|
2894
|
+
|
2895
|
+
# This method is called from intercepted calls to `type_member` and `type_template`.
|
2896
|
+
# We get passed all the arguments to those methods, as well as the `T::Types::TypeVariable`
|
2897
|
+
# instance generated by the Sorbet defined `type_member`/`type_template` call on `T::Generic`.
|
2898
|
+
#
|
2899
|
+
# This method creates a `String` with that data and stores it in the
|
2900
|
+
# `@type_variables` lookup table, keyed by the `constant` and `type_variable`.
|
2901
|
+
#
|
2902
|
+
# Finally, the original `type_variable` is returned from this method, so that the caller
|
2903
|
+
# can return it from the original methods as well.
|
2904
|
+
#
|
2905
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#104
|
2906
|
+
sig { params(constant: T.untyped, type_variable: ::Tapioca::TypeVariableModule).void }
|
2907
|
+
def register_type_variable(constant, type_variable); end
|
2908
|
+
|
2909
|
+
private
|
2910
|
+
|
2911
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#113
|
2912
|
+
sig { params(constant: ::Module, name: ::String).returns(::Module) }
|
2913
|
+
def create_generic_type(constant, name); end
|
2914
|
+
|
2915
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#155
|
2916
|
+
sig { params(constant: T::Class[T.anything]).returns(T::Class[T.anything]) }
|
2917
|
+
def create_safe_subclass(constant); end
|
2918
|
+
|
2919
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#182
|
2920
|
+
sig { params(constant: ::Module).returns(T::Array[::Tapioca::TypeVariableModule]) }
|
2921
|
+
def lookup_or_initialize_type_variables(constant); end
|
2922
|
+
end
|
2923
|
+
end
|
2924
|
+
|
2925
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#34
|
2926
|
+
class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple
|
2927
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#38
|
2928
|
+
sig { params(raw_type: ::Module, underlying_type: ::Module).void }
|
2929
|
+
def initialize(raw_type, underlying_type); end
|
2930
|
+
|
2931
|
+
# source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45
|
2932
|
+
sig { params(obj: T.untyped).returns(T::Boolean) }
|
2933
|
+
def valid?(obj); end
|
2934
|
+
end
|
2935
|
+
|
2936
|
+
module Tapioca::Runtime::Reflection
|
2937
|
+
include ::Tapioca::Runtime::AttachedClassOf
|
2938
|
+
extend ::Tapioca::Runtime::AttachedClassOf
|
2939
|
+
extend ::Tapioca::Runtime::Reflection
|
2940
|
+
|
2941
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#196
|
2942
|
+
sig { params(constant: ::Module).returns(T.untyped) }
|
2943
|
+
def abstract_type_of(constant); end
|
2944
|
+
|
2945
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#77
|
2946
|
+
sig { params(constant: ::Module).returns(T::Array[::Module]) }
|
2947
|
+
def ancestors_of(constant); end
|
2948
|
+
|
2949
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#92
|
2950
|
+
sig { params(object: ::BasicObject, other: ::BasicObject).returns(T::Boolean) }
|
2951
|
+
def are_equal?(object, other); end
|
2952
|
+
|
2953
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#56
|
2954
|
+
sig { params(object: ::BasicObject).returns(T::Class[T.anything]) }
|
2955
|
+
def class_of(object); end
|
2956
|
+
|
2957
|
+
# @param constant [BasicObject]
|
2958
|
+
# @return [Boolean]
|
2959
|
+
#
|
2960
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#38
|
2961
|
+
def constant_defined?(constant); end
|
2962
|
+
|
2963
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#49
|
2964
|
+
sig { params(symbol: ::String, inherit: T::Boolean, namespace: ::Module).returns(::BasicObject) }
|
2965
|
+
def constantize(symbol, inherit: T.unsafe(nil), namespace: T.unsafe(nil)); end
|
2966
|
+
|
2967
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#61
|
2968
|
+
sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
|
2969
|
+
def constants_of(constant); end
|
2970
|
+
|
2971
|
+
# Returns an array with all classes that are < than the supplied class.
|
2972
|
+
#
|
2973
|
+
# class C; end
|
2974
|
+
# descendants_of(C) # => []
|
2975
|
+
#
|
2976
|
+
# class B < C; end
|
2977
|
+
# descendants_of(C) # => [B]
|
2978
|
+
#
|
2979
|
+
# class A < B; end
|
2980
|
+
# descendants_of(C) # => [B, A]
|
2981
|
+
#
|
2982
|
+
# class D < C; end
|
2983
|
+
# descendants_of(C) # => [B, A, D]
|
2984
|
+
#
|
2985
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#167
|
2986
|
+
sig do
|
2987
|
+
type_parameters(:U)
|
2988
|
+
.params(
|
2989
|
+
klass: T.all(T.type_parameter(:U), T::Class[T.anything])
|
2990
|
+
).returns(T::Array[T.type_parameter(:U)])
|
2991
|
+
end
|
2992
|
+
def descendants_of(klass); end
|
2993
|
+
|
2994
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#189
|
2995
|
+
sig { params(constant: ::Module).returns(T::Set[::String]) }
|
2996
|
+
def file_candidates_for(constant); end
|
2997
|
+
|
2998
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#202
|
2999
|
+
sig { params(constant: ::Module).returns(T::Boolean) }
|
3000
|
+
def final_module?(constant); end
|
3001
|
+
|
3002
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#112
|
3003
|
+
sig { params(constant: ::Module).returns(T::Array[::Module]) }
|
3004
|
+
def inherited_ancestors_of(constant); end
|
3005
|
+
|
3006
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#145
|
3007
|
+
sig { params(constant: ::Module, method: ::Symbol).returns(::Method) }
|
3008
|
+
def method_of(constant, method); end
|
3009
|
+
|
3010
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#66
|
3011
|
+
sig { params(constant: ::Module).returns(T.nilable(::String)) }
|
3012
|
+
def name_of(constant); end
|
3013
|
+
|
3014
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#140
|
3015
|
+
sig { params(type: ::T::Types::Base).returns(::String) }
|
3016
|
+
def name_of_type(type); end
|
3017
|
+
|
3018
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#87
|
3019
|
+
sig { params(object: ::BasicObject).returns(::Integer) }
|
3020
|
+
def object_id_of(object); end
|
3021
|
+
|
3022
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#107
|
3023
|
+
sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
|
3024
|
+
def private_instance_methods_of(constant); end
|
3025
|
+
|
3026
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#102
|
3027
|
+
sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
|
3028
|
+
def protected_instance_methods_of(constant); end
|
3029
|
+
|
3030
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#97
|
3031
|
+
sig { params(constant: ::Module).returns(T::Array[::Symbol]) }
|
3032
|
+
def public_instance_methods_of(constant); end
|
3033
|
+
|
3034
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#121
|
3035
|
+
sig { params(constant: ::Module).returns(T.nilable(::String)) }
|
3036
|
+
def qualified_name_of(constant); end
|
3037
|
+
|
3038
|
+
# Examines the call stack to identify the closest location where a "require" is performed
|
3039
|
+
# by searching for the label "<top (required)>". If none is found, it returns the location
|
3040
|
+
# labeled "<main>", which is the original call site.
|
3041
|
+
#
|
3042
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#179
|
3043
|
+
sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) }
|
3044
|
+
def resolve_loc(locations); end
|
3045
|
+
|
3046
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#207
|
3047
|
+
sig { params(constant: ::Module).returns(T::Boolean) }
|
3048
|
+
def sealed_module?(constant); end
|
3049
|
+
|
3050
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#133
|
3051
|
+
sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) }
|
3052
|
+
def signature_of(method); end
|
3053
|
+
|
3054
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#72
|
3055
|
+
sig { params(constant: ::Module).returns(T::Class[T.anything]) }
|
3056
|
+
def singleton_class_of(constant); end
|
3057
|
+
|
3058
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#82
|
3059
|
+
sig { params(constant: T::Class[T.anything]).returns(T.nilable(T::Class[T.anything])) }
|
3060
|
+
def superclass_of(constant); end
|
3061
|
+
|
3062
|
+
private
|
3063
|
+
|
3064
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#244
|
3065
|
+
sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) }
|
3066
|
+
def child_module_for_parent_with_name(parent, name); end
|
3067
|
+
|
3068
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#260
|
3069
|
+
sig { params(name: ::String).returns(T::Boolean) }
|
3070
|
+
def has_aliased_namespace?(name); end
|
3071
|
+
|
3072
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#255
|
3073
|
+
sig { params(method: ::UnboundMethod).returns(T::Boolean) }
|
3074
|
+
def method_defined_by_forwardable_module?(method); end
|
3075
|
+
|
3076
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#230
|
3077
|
+
sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) }
|
3078
|
+
def methods_for(constant); end
|
3079
|
+
|
3080
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#214
|
3081
|
+
sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) }
|
3082
|
+
def relevant_methods_for(constant); end
|
3083
|
+
end
|
3084
|
+
|
3085
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#25
|
3086
|
+
Tapioca::Runtime::Reflection::ANCESTORS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3087
|
+
|
3088
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#21
|
3089
|
+
Tapioca::Runtime::Reflection::CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3090
|
+
|
3091
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#22
|
3092
|
+
Tapioca::Runtime::Reflection::CONSTANTS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3093
|
+
|
3094
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#28
|
3095
|
+
Tapioca::Runtime::Reflection::EQUAL_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3096
|
+
|
3097
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#32
|
3098
|
+
Tapioca::Runtime::Reflection::METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3099
|
+
|
3100
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#23
|
3101
|
+
Tapioca::Runtime::Reflection::NAME_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3102
|
+
|
3103
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#27
|
3104
|
+
Tapioca::Runtime::Reflection::OBJECT_ID_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3105
|
+
|
3106
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#31
|
3107
|
+
Tapioca::Runtime::Reflection::PRIVATE_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3108
|
+
|
3109
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#30
|
3110
|
+
Tapioca::Runtime::Reflection::PROTECTED_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3111
|
+
|
3112
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#29
|
3113
|
+
Tapioca::Runtime::Reflection::PUBLIC_INSTANCE_METHODS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3114
|
+
|
3115
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#35
|
3116
|
+
Tapioca::Runtime::Reflection::REQUIRED_FROM_LABELS = T.let(T.unsafe(nil), Array)
|
3117
|
+
|
3118
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#24
|
3119
|
+
Tapioca::Runtime::Reflection::SINGLETON_CLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3120
|
+
|
3121
|
+
# source://tapioca//lib/tapioca/runtime/reflection.rb#26
|
3122
|
+
Tapioca::Runtime::Reflection::SUPERCLASS_METHOD = T.let(T.unsafe(nil), UnboundMethod)
|
3123
|
+
|
3124
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#6
|
3125
|
+
module Tapioca::Runtime::Trackers
|
3126
|
+
class << self
|
3127
|
+
# source://tapioca//lib/tapioca/runtime/trackers.rb#34
|
3128
|
+
sig { void }
|
3129
|
+
def disable_all!; end
|
3130
|
+
|
3131
|
+
# source://tapioca//lib/tapioca/runtime/trackers.rb#39
|
3132
|
+
sig { params(tracker: ::Tapioca::Runtime::Trackers::Tracker).void }
|
3133
|
+
def register_tracker(tracker); end
|
3134
|
+
|
3135
|
+
# source://tapioca//lib/tapioca/runtime/trackers.rb#21
|
3136
|
+
sig do
|
3137
|
+
type_parameters(:Return)
|
3138
|
+
.params(
|
3139
|
+
blk: T.proc.returns(T.type_parameter(:Return))
|
3140
|
+
).returns(T.type_parameter(:Return))
|
3141
|
+
end
|
3142
|
+
def with_trackers_enabled(&blk); end
|
3143
|
+
end
|
3144
|
+
end
|
3145
|
+
|
3146
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#7
|
3147
|
+
module Tapioca::Runtime::Trackers::Autoload
|
3148
|
+
extend ::Tapioca::Runtime::Trackers::Tracker
|
3149
|
+
|
3150
|
+
class << self
|
3151
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#19
|
3152
|
+
sig { void }
|
3153
|
+
def eager_load_all!; end
|
3154
|
+
|
3155
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#31
|
3156
|
+
sig { params(constant_name: ::String).void }
|
3157
|
+
def register(constant_name); end
|
3158
|
+
|
3159
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#42
|
3160
|
+
sig do
|
3161
|
+
type_parameters(:Result)
|
3162
|
+
.params(
|
3163
|
+
block: T.proc.returns(T.type_parameter(:Result))
|
3164
|
+
).returns(T.type_parameter(:Result))
|
3165
|
+
end
|
3166
|
+
def with_disabled_exits(&block); end
|
3167
|
+
end
|
3168
|
+
end
|
3169
|
+
|
3170
|
+
# source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#11
|
3171
|
+
Tapioca::Runtime::Trackers::Autoload::NOOP_METHOD = T.let(T.unsafe(nil), Proc)
|
3172
|
+
|
3173
|
+
# Registers a TracePoint immediately upon load to track points at which
|
3174
|
+
# classes and modules are opened for definition. This is used to track
|
3175
|
+
# correspondence between classes/modules and files, as this information isn't
|
3176
|
+
# available in the ruby runtime without extra accounting.
|
3177
|
+
module Tapioca::Runtime::Trackers::ConstantDefinition
|
3178
|
+
extend ::Tapioca::Runtime::Trackers::Tracker
|
3179
|
+
extend ::Tapioca::Runtime::AttachedClassOf
|
3180
|
+
extend ::Tapioca::Runtime::Reflection
|
3181
|
+
|
3182
|
+
class << self
|
3183
|
+
# source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#61
|
3184
|
+
def build_constant_location(tp, locations); end
|
3185
|
+
|
3186
|
+
# source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#55
|
3187
|
+
def disable!; end
|
3188
|
+
|
3189
|
+
# Returns the files in which this class or module was opened. Doesn't know
|
3190
|
+
# about situations where the class was opened prior to +require+ing,
|
3191
|
+
# or where metaprogramming was used via +eval+, etc.
|
3192
|
+
#
|
3193
|
+
# source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#71
|
3194
|
+
def files_for(klass); end
|
3195
|
+
|
3196
|
+
# source://tapioca//lib/tapioca/runtime/trackers/constant_definition.rb#75
|
3197
|
+
def locations_for(klass); end
|
3198
|
+
end
|
3199
|
+
end
|
3200
|
+
|
3201
|
+
module Tapioca::Runtime::Trackers::Mixin
|
3202
|
+
extend ::Tapioca::Runtime::Trackers::Tracker
|
3203
|
+
|
3204
|
+
class << self
|
3205
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#56
|
3206
|
+
sig do
|
3207
|
+
params(
|
3208
|
+
mixin: ::Module
|
3209
|
+
).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]])
|
3210
|
+
end
|
3211
|
+
def constants_with_mixin(mixin); end
|
3212
|
+
|
3213
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#61
|
3214
|
+
sig do
|
3215
|
+
params(
|
3216
|
+
mixin: ::Module,
|
3217
|
+
mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type,
|
3218
|
+
constant: ::Module
|
3219
|
+
).returns(T.nilable(::String))
|
3220
|
+
end
|
3221
|
+
def mixin_location(mixin, mixin_type, constant); end
|
3222
|
+
|
3223
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#35
|
3224
|
+
sig { params(constant: ::Module, mixin: ::Module, mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type).void }
|
3225
|
+
def register(constant, mixin, mixin_type); end
|
3226
|
+
|
3227
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#43
|
3228
|
+
def resolve_to_attached_class(constant, mixin, mixin_type); end
|
3229
|
+
|
3230
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#30
|
3231
|
+
sig do
|
3232
|
+
type_parameters(:Result)
|
3233
|
+
.params(
|
3234
|
+
block: T.proc.returns(T.type_parameter(:Result))
|
3235
|
+
).returns(T.type_parameter(:Result))
|
3236
|
+
end
|
3237
|
+
def with_disabled_registration(&block); end
|
3238
|
+
|
3239
|
+
private
|
3240
|
+
|
3241
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#76
|
3242
|
+
sig do
|
3243
|
+
params(
|
3244
|
+
mixin: ::Module
|
3245
|
+
).returns(T::Hash[::Tapioca::Runtime::Trackers::Mixin::Type, T::Hash[::Module, ::String]])
|
3246
|
+
end
|
3247
|
+
def find_or_initialize_mixin_lookup(mixin); end
|
3248
|
+
|
3249
|
+
# source://tapioca//lib/tapioca/runtime/trackers/mixin.rb#68
|
3250
|
+
sig do
|
3251
|
+
params(
|
3252
|
+
constant: ::Module,
|
3253
|
+
mixin: ::Module,
|
3254
|
+
mixin_type: ::Tapioca::Runtime::Trackers::Mixin::Type,
|
3255
|
+
location: ::String
|
3256
|
+
).void
|
3257
|
+
end
|
3258
|
+
def register_with_location(constant, mixin, mixin_type, location); end
|
3259
|
+
end
|
3260
|
+
end
|
3261
|
+
|
3262
|
+
class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum
|
3263
|
+
enums do
|
3264
|
+
Prepend = new
|
3265
|
+
Include = new
|
3266
|
+
Extend = new
|
3267
|
+
end
|
3268
|
+
end
|
3269
|
+
|
3270
|
+
# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#7
|
3271
|
+
module Tapioca::Runtime::Trackers::RequiredAncestor
|
3272
|
+
extend ::Tapioca::Runtime::Trackers::Tracker
|
3273
|
+
|
3274
|
+
class << self
|
3275
|
+
# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#15
|
3276
|
+
sig { params(requiring: ::T::Helpers, block: T.proc.void).void }
|
3277
|
+
def register(requiring, block); end
|
3278
|
+
|
3279
|
+
# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#23
|
3280
|
+
sig { params(mod: ::Module).returns(T::Array[T.proc.void]) }
|
3281
|
+
def required_ancestors_blocks_by(mod); end
|
3282
|
+
|
3283
|
+
# source://tapioca//lib/tapioca/runtime/trackers/required_ancestor.rb#28
|
3284
|
+
sig { params(mod: ::Module).returns(T::Array[T.untyped]) }
|
3285
|
+
def required_ancestors_by(mod); end
|
3286
|
+
end
|
3287
|
+
end
|
3288
|
+
|
3289
|
+
# @abstract Subclasses must implement the `abstract` methods below.
|
3290
|
+
module Tapioca::Runtime::Trackers::Tracker
|
3291
|
+
abstract!
|
3292
|
+
|
3293
|
+
# source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#26
|
3294
|
+
sig { void }
|
3295
|
+
def disable!; end
|
3296
|
+
|
3297
|
+
# @return [Boolean]
|
3298
|
+
#
|
3299
|
+
# source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#30
|
3300
|
+
def enabled?; end
|
3301
|
+
|
3302
|
+
# source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#34
|
3303
|
+
def with_disabled_tracker(&block); end
|
3304
|
+
|
3305
|
+
class << self
|
3306
|
+
# source://tapioca//lib/tapioca/runtime/trackers/tracker.rb#17
|
3307
|
+
sig { params(base: T.all(::Module, ::Tapioca::Runtime::Trackers::Tracker)).void }
|
3308
|
+
def extended(base); end
|
3309
|
+
end
|
3310
|
+
end
|
3311
|
+
|
3312
|
+
# source://tapioca//lib/tapioca.rb#34
|
3313
|
+
Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String)
|
3314
|
+
|
3315
|
+
# source://tapioca//lib/tapioca.rb#33
|
3316
|
+
Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String)
|
3317
|
+
|
3318
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5
|
3319
|
+
module Tapioca::SorbetHelper
|
3320
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#32
|
3321
|
+
sig { params(sorbet_args: ::String).returns(::Spoom::ExecResult) }
|
3322
|
+
def sorbet(*sorbet_args); end
|
3323
|
+
|
3324
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#37
|
3325
|
+
sig { returns(::String) }
|
3326
|
+
def sorbet_path; end
|
3327
|
+
|
3328
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#44
|
3329
|
+
sig { params(feature: ::Symbol, version: T.nilable(::Gem::Version)).returns(T::Boolean) }
|
3330
|
+
def sorbet_supports?(feature, version: T.unsafe(nil)); end
|
3331
|
+
end
|
3332
|
+
|
3333
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#24
|
3334
|
+
Tapioca::SorbetHelper::FEATURE_REQUIREMENTS = T.let(T.unsafe(nil), Hash)
|
3335
|
+
|
3336
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#13
|
3337
|
+
Tapioca::SorbetHelper::SORBET_BIN = T.let(T.unsafe(nil), Pathname)
|
3338
|
+
|
3339
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#18
|
3340
|
+
Tapioca::SorbetHelper::SORBET_EXE_PATH_ENV_VAR = T.let(T.unsafe(nil), String)
|
3341
|
+
|
3342
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#8
|
3343
|
+
Tapioca::SorbetHelper::SORBET_GEM_SPEC = T.let(T.unsafe(nil), Gem::Specification)
|
3344
|
+
|
3345
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#20
|
3346
|
+
Tapioca::SorbetHelper::SORBET_PAYLOAD_URL = T.let(T.unsafe(nil), String)
|
3347
|
+
|
3348
|
+
# source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#22
|
3349
|
+
Tapioca::SorbetHelper::SPOOM_CONTEXT = T.let(T.unsafe(nil), Spoom::Context)
|
3350
|
+
|
3351
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#5
|
3352
|
+
module Tapioca::Static; end
|
3353
|
+
|
3354
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#6
|
3355
|
+
class Tapioca::Static::RequiresCompiler
|
3356
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#10
|
3357
|
+
sig { params(sorbet_path: ::String).void }
|
3358
|
+
def initialize(sorbet_path); end
|
3359
|
+
|
3360
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#15
|
3361
|
+
sig { returns(::String) }
|
3362
|
+
def compile; end
|
3363
|
+
|
3364
|
+
private
|
3365
|
+
|
3366
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#29
|
3367
|
+
sig { params(config: ::Spoom::Sorbet::Config).returns(T::Array[::String]) }
|
3368
|
+
def collect_files(config); end
|
3369
|
+
|
3370
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#44
|
3371
|
+
sig { params(file_path: ::String).returns(T::Enumerable[::String]) }
|
3372
|
+
def collect_requires(file_path); end
|
3373
|
+
|
3374
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#51
|
3375
|
+
sig { params(config: ::Spoom::Sorbet::Config, file_path: ::Pathname).returns(T::Boolean) }
|
3376
|
+
def file_ignored_by_sorbet?(config, file_path); end
|
3377
|
+
|
3378
|
+
# source://tapioca//lib/tapioca/static/requires_compiler.rb#80
|
3379
|
+
sig { params(path: ::Pathname).returns(T::Array[::String]) }
|
3380
|
+
def path_parts(path); end
|
3381
|
+
end
|
3382
|
+
|
3383
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#6
|
3384
|
+
module Tapioca::Static::SymbolLoader
|
3385
|
+
extend ::Tapioca::SorbetHelper
|
3386
|
+
extend ::Tapioca::Runtime::AttachedClassOf
|
3387
|
+
extend ::Tapioca::Runtime::Reflection
|
3388
|
+
|
3389
|
+
class << self
|
3390
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#23
|
3391
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
|
3392
|
+
def engine_symbols(gem); end
|
3393
|
+
|
3394
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#48
|
3395
|
+
sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) }
|
3396
|
+
def gem_symbols(gem); end
|
3397
|
+
|
3398
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#13
|
3399
|
+
sig { returns(T::Set[::String]) }
|
3400
|
+
def payload_symbols; end
|
3401
|
+
|
3402
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#53
|
3403
|
+
sig { params(paths: T::Array[::Pathname]).returns(T::Set[::String]) }
|
3404
|
+
def symbols_from_paths(paths); end
|
3405
|
+
|
3406
|
+
private
|
3407
|
+
|
3408
|
+
# @return [Array<T.class_of(Rails::Engine)>]
|
3409
|
+
#
|
3410
|
+
# source://sorbet-runtime/0.5.11481/lib/types/private/methods/_methods.rb#257
|
3411
|
+
def engines(*args, **_arg1, &blk); end
|
3412
|
+
|
3413
|
+
# source://tapioca//lib/tapioca/static/symbol_loader.rb#82
|
3414
|
+
sig { params(input: ::String, table_type: ::String).returns(::String) }
|
3415
|
+
def symbol_table_json_from(input, table_type: T.unsafe(nil)); end
|
3416
|
+
end
|
3417
|
+
end
|
3418
|
+
|
3419
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#6
|
3420
|
+
class Tapioca::Static::SymbolTableParser
|
3421
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#30
|
3422
|
+
sig { void }
|
3423
|
+
def initialize; end
|
3424
|
+
|
3425
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#65
|
3426
|
+
sig { params(name: ::String).returns(::String) }
|
3427
|
+
def fully_qualified_name(name); end
|
3428
|
+
|
3429
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#36
|
3430
|
+
sig { params(object: T::Hash[::String, T.untyped]).void }
|
3431
|
+
def parse_object(object); end
|
3432
|
+
|
3433
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#27
|
3434
|
+
sig { returns(T::Set[::String]) }
|
3435
|
+
def symbols; end
|
3436
|
+
|
3437
|
+
class << self
|
3438
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#15
|
3439
|
+
sig { params(json_string: ::String).returns(T::Set[::String]) }
|
3440
|
+
def parse_json(json_string); end
|
3441
|
+
end
|
3442
|
+
end
|
3443
|
+
|
3444
|
+
# source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9
|
3445
|
+
Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array)
|
3446
|
+
|
3447
|
+
# source://tapioca//lib/tapioca.rb#36
|
3448
|
+
Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String)
|
3449
|
+
|
3450
|
+
# source://tapioca//lib/tapioca.rb#35
|
3451
|
+
Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String)
|
3452
|
+
|
3453
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108
|
3454
|
+
class Tapioca::TypeVariable < ::T::Types::TypeVariable
|
3455
|
+
# @return [TypeVariable] a new instance of TypeVariable
|
3456
|
+
#
|
3457
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#109
|
3458
|
+
def initialize(name, variance); end
|
3459
|
+
|
3460
|
+
# Returns the value of attribute name.
|
3461
|
+
#
|
3462
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#114
|
3463
|
+
def name; end
|
3464
|
+
end
|
3465
|
+
|
3466
|
+
# This is subclassing from `Module` so that instances of this type will be modules.
|
3467
|
+
# The reason why we want that is because that means those instances will automatically
|
3468
|
+
# get bound to the constant names they are assigned to by Ruby. As a result, we don't
|
3469
|
+
# need to do any matching of constants to type variables to bind their names, Ruby will
|
3470
|
+
# do that automatically for us and we get the `name` method for free from `Module`.
|
3471
|
+
#
|
3472
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#122
|
3473
|
+
class Tapioca::TypeVariableModule < ::Module
|
3474
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#146
|
3475
|
+
sig do
|
3476
|
+
params(
|
3477
|
+
context: ::Module,
|
3478
|
+
type: ::Tapioca::TypeVariableModule::Type,
|
3479
|
+
variance: ::Symbol,
|
3480
|
+
bounds_proc: T.nilable(T.proc.returns(T::Hash[::Symbol, T.untyped]))
|
3481
|
+
).void
|
3482
|
+
end
|
3483
|
+
def initialize(context, type, variance, bounds_proc); end
|
3484
|
+
|
3485
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#181
|
3486
|
+
sig { returns(::Tapioca::TypeVariable) }
|
3487
|
+
def coerce_to_type_variable; end
|
3488
|
+
|
3489
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#161
|
3490
|
+
sig { returns(T::Boolean) }
|
3491
|
+
def fixed?; end
|
3492
|
+
|
3493
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#155
|
3494
|
+
sig { returns(T.nilable(::String)) }
|
3495
|
+
def name; end
|
3496
|
+
|
3497
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#166
|
3498
|
+
sig { returns(::String) }
|
3499
|
+
def serialize; end
|
3500
|
+
|
3501
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#136
|
3502
|
+
sig { returns(::Tapioca::TypeVariableModule::Type) }
|
3503
|
+
def type; end
|
3504
|
+
|
3505
|
+
private
|
3506
|
+
|
3507
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#188
|
3508
|
+
sig { returns(T::Hash[::Symbol, T.untyped]) }
|
3509
|
+
def bounds; end
|
3510
|
+
end
|
3511
|
+
|
3512
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#133
|
3513
|
+
Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc)
|
3514
|
+
|
3515
|
+
# source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125
|
3516
|
+
class Tapioca::TypeVariableModule::Type < ::T::Enum
|
3517
|
+
enums do
|
3518
|
+
Member = new
|
3519
|
+
Template = new
|
3520
|
+
HasAttachedClass = new
|
3521
|
+
end
|
3522
|
+
end
|
3523
|
+
|
3524
|
+
# source://tapioca//lib/tapioca/version.rb#5
|
3525
|
+
Tapioca::VERSION = T.let(T.unsafe(nil), String)
|
3526
|
+
|
3527
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#7
|
3528
|
+
class URI::Source < ::URI::File
|
3529
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#58
|
3530
|
+
sig { params(v: T.nilable(::String)).returns(T::Boolean) }
|
3531
|
+
def check_host(v); end
|
3532
|
+
|
3533
|
+
# source://uri/0.13.0/uri/generic.rb#243
|
3534
|
+
def gem_name; end
|
3535
|
+
|
3536
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#25
|
3537
|
+
sig { returns(T.nilable(::String)) }
|
3538
|
+
def gem_version; end
|
3539
|
+
|
3540
|
+
# source://uri/0.13.0/uri/generic.rb#283
|
3541
|
+
def line_number; end
|
3542
|
+
|
3543
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#51
|
3544
|
+
sig { params(v: T.nilable(::String)).void }
|
3545
|
+
def set_path(v); end
|
3546
|
+
|
3547
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#70
|
3548
|
+
sig { returns(::String) }
|
3549
|
+
def to_s; end
|
3550
|
+
|
3551
|
+
class << self
|
3552
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#38
|
3553
|
+
sig do
|
3554
|
+
params(
|
3555
|
+
gem_name: ::String,
|
3556
|
+
gem_version: T.nilable(::String),
|
3557
|
+
path: ::String,
|
3558
|
+
line_number: T.nilable(::String)
|
3559
|
+
).returns(::URI::Source)
|
3560
|
+
end
|
3561
|
+
def build(gem_name:, gem_version:, path:, line_number:); end
|
3562
|
+
end
|
3563
|
+
end
|
3564
|
+
|
3565
|
+
# source://tapioca//lib/tapioca/helpers/source_uri.rb#10
|
3566
|
+
URI::Source::COMPONENT = T.let(T.unsafe(nil), Array)
|