orthoses 1.8.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/orthoses/attribute.rb +28 -55
- data/lib/orthoses/constant.rb +0 -1
- data/lib/orthoses/content/duplication_checker.rb +19 -2
- data/lib/orthoses/content/environment.rb +21 -5
- data/lib/orthoses/content.rb +20 -13
- data/lib/orthoses/lazy_trace_point.rb +37 -44
- data/lib/orthoses/mixin.rb +29 -39
- data/lib/orthoses/rbs_prototype_runtime.rb +3 -3
- data/lib/orthoses/trace/attribute.rb +26 -8
- data/lib/orthoses/utils.rb +1 -1
- data/lib/orthoses/version.rb +1 -1
- data/sig/orthoses/attribute.rbs +2 -2
- data/sig/orthoses/autoload.rbs +1 -0
- data/sig/orthoses/builder.rbs +2 -0
- data/sig/orthoses/call_tracer/lazy.rbs +2 -0
- data/sig/orthoses/call_tracer.rbs +2 -0
- data/sig/orthoses/const_load_error.rbs +3 -0
- data/sig/orthoses/constant.rbs +2 -2
- data/sig/orthoses/content/array_io.rbs +1 -0
- data/sig/orthoses/content/duplication_checker.rbs +5 -0
- data/sig/orthoses/content/environment.rbs +9 -8
- data/sig/orthoses/content/header_builder.rbs +2 -0
- data/sig/orthoses/content.rbs +5 -0
- data/sig/orthoses/create_file_by_name.rbs +6 -1
- data/sig/orthoses/delegate_class.rbs +1 -1
- data/sig/orthoses/filter.rbs +3 -2
- data/sig/orthoses/lazy_trace_point/method_added_hook.rbs +6 -0
- data/sig/orthoses/lazy_trace_point.rbs +6 -6
- data/sig/orthoses/load_rbs.rbs +2 -2
- data/sig/orthoses/missing_name/missing_class.rbs +1 -0
- data/sig/orthoses/missing_name/missing_module.rbs +1 -0
- data/sig/orthoses/missing_name.rbs +1 -0
- data/sig/orthoses/mixin.rbs +4 -2
- data/sig/orthoses/object_space_all.rbs +1 -1
- data/sig/orthoses/outputable/avoid_recursive_ancestor_error.rbs +1 -1
- data/sig/orthoses/outputable/constantizable_filter.rbs +1 -0
- data/sig/orthoses/outputable/uniq_content_body.rbs +1 -0
- data/sig/orthoses/outputable.rbs +2 -0
- data/sig/orthoses/path_helper.rbs +2 -0
- data/sig/orthoses/pp.rbs +1 -0
- data/sig/orthoses/rbs_prototype_rb.rbs +2 -2
- data/sig/orthoses/rbs_prototype_runtime.rbs +3 -3
- data/sig/orthoses/sort.rbs +1 -0
- data/sig/orthoses/store.rbs +1 -0
- data/sig/orthoses/tap.rbs +2 -1
- data/sig/orthoses/trace/attribute/hook.rbs +11 -0
- data/sig/orthoses/trace/attribute.rbs +3 -0
- data/sig/orthoses/trace/method.rbs +5 -0
- data/sig/orthoses/trace.rbs +2 -0
- data/sig/orthoses/utils/type_list.rbs +1 -0
- data/sig/orthoses/utils.rbs +2 -0
- data/sig/orthoses/walk.rbs +2 -2
- data/sig/orthoses/writer.rbs +2 -1
- data/sig/orthoses.rbs +5 -5
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae5d17d8e6292f29138e1cbfe8feaf07425c55bdc2db58e0110ab1587bef062a
|
4
|
+
data.tar.gz: 724784da1b64edba217ea75a344ba67f787a4be3f53949b2c94c5ab00b15846f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f27081184ca9da7caa25fcd25dbac29dfa2b7cd3ef32bf00f49cf7232fd182b7b7f3d13f4f88f254e0b98cf93d5fbfbb5f47a65cc4edbd1cf68822c43d143fb2
|
7
|
+
data.tar.gz: ca45ade090eb276344b7a30457d74a7467d48caeb94b875b86fbfe51777841bbc04fcb85ea4c4df9b7399b7d8d3ec7fe03f2f5fab08dda5f2908e383ebb0365f
|
data/lib/orthoses/attribute.rb
CHANGED
@@ -1,98 +1,71 @@
|
|
1
1
|
module Orthoses
|
2
2
|
class Attribute
|
3
|
+
CALL_GRAPH = {}
|
4
|
+
|
3
5
|
module Hook
|
4
6
|
def attr(*names)
|
7
|
+
(CALL_GRAPH[self]||=[]) << [:attr, names]
|
5
8
|
super
|
6
9
|
end
|
7
10
|
|
8
11
|
def attr_accessor(*names)
|
12
|
+
(CALL_GRAPH[self]||=[]) << [:attr_accessor, names]
|
9
13
|
super
|
10
14
|
end
|
11
15
|
|
12
16
|
def attr_reader(*names)
|
17
|
+
(CALL_GRAPH[self]||=[]) << [:attr_reader, names]
|
13
18
|
super
|
14
19
|
end
|
15
20
|
|
16
21
|
def attr_writer(*names)
|
22
|
+
(CALL_GRAPH[self]||=[]) << [:attr_writer, names]
|
17
23
|
super
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
21
27
|
def initialize(loader)
|
28
|
+
CALL_GRAPH.clear
|
22
29
|
@loader = loader
|
23
30
|
end
|
24
31
|
|
25
32
|
def call
|
26
33
|
::Module.prepend(Hook)
|
27
34
|
|
28
|
-
|
29
|
-
attr_accessor = CallTracer.new
|
30
|
-
attr_reader = CallTracer.new
|
31
|
-
attr_writer = CallTracer.new
|
32
|
-
|
33
|
-
store = attr.trace(Hook.instance_method(:attr)) do
|
34
|
-
attr_accessor.trace(Hook.instance_method(:attr_accessor)) do
|
35
|
-
attr_reader.trace(Hook.instance_method(:attr_reader)) do
|
36
|
-
attr_writer.trace(Hook.instance_method(:attr_writer)) do
|
37
|
-
@loader.call
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
35
|
+
store = @loader.call
|
42
36
|
|
43
|
-
|
44
|
-
m =
|
37
|
+
CALL_GRAPH.dup.each do |base_mod, calls|
|
38
|
+
m = base_mod.to_s.match(/#<Class:([\w:]+)>/)
|
45
39
|
if m && m[1]
|
46
40
|
receiver_name = m[1]
|
47
41
|
prefix = "self."
|
48
42
|
else
|
49
|
-
receiver_name = Utils.module_name(
|
43
|
+
receiver_name = Utils.module_name(base_mod) or next
|
50
44
|
prefix = nil
|
51
45
|
end
|
52
46
|
content = store[receiver_name]
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
47
|
+
|
48
|
+
calls.each do |(a, names)|
|
49
|
+
case a
|
50
|
+
when :attr
|
51
|
+
if names[1].equal?(true)
|
52
|
+
content << "attr_accessor #{prefix}#{names[0]}: untyped"
|
53
|
+
elsif names[1].equal?(false)
|
54
|
+
content << "attr_reader #{prefix}#{names[0]}: untyped"
|
55
|
+
else
|
56
|
+
names.each do |name|
|
57
|
+
content << "attr_reader #{prefix}#{name}: untyped"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
else
|
61
|
+
names.each do |name|
|
62
|
+
content << "#{a} #{prefix}#{name}: untyped"
|
63
|
+
end
|
61
64
|
end
|
62
65
|
end
|
63
66
|
end
|
64
67
|
|
65
|
-
each_definition(attr_accessor) do |receiver_name, name|
|
66
|
-
store[receiver_name] << "attr_accessor #{name}: untyped"
|
67
|
-
end
|
68
|
-
each_definition(attr_reader) do |receiver_name, name|
|
69
|
-
store[receiver_name] << "attr_reader #{name}: untyped"
|
70
|
-
end
|
71
|
-
each_definition(attr_writer) do |receiver_name, name|
|
72
|
-
store[receiver_name] << "attr_writer #{name}: untyped"
|
73
|
-
end
|
74
|
-
|
75
68
|
store
|
76
69
|
end
|
77
|
-
|
78
|
-
private
|
79
|
-
|
80
|
-
def each_definition(call_tracer)
|
81
|
-
call_tracer.captures.each do |capture|
|
82
|
-
m = capture.method.receiver.to_s.match(/#<Class:([\w:]+)>/)
|
83
|
-
names = capture.argument[:names]
|
84
|
-
if m && m[1]
|
85
|
-
receiver_name = m[1]
|
86
|
-
names.each do |name|
|
87
|
-
yield [receiver_name, "self.#{name}"]
|
88
|
-
end
|
89
|
-
else
|
90
|
-
receiver_name = Utils.module_name(capture.method.receiver) or next
|
91
|
-
names.each do |name|
|
92
|
-
yield [receiver_name, name]
|
93
|
-
end
|
94
|
-
end
|
95
|
-
end
|
96
|
-
end
|
97
70
|
end
|
98
71
|
end
|
data/lib/orthoses/constant.rb
CHANGED
@@ -14,6 +14,7 @@ module Orthoses
|
|
14
14
|
|
15
15
|
uniq_members
|
16
16
|
drop_set_method_definition
|
17
|
+
drop_by_singleton_instance
|
17
18
|
drop_known_method_definition
|
18
19
|
drop_known_const_definition
|
19
20
|
|
@@ -40,6 +41,14 @@ module Orthoses
|
|
40
41
|
end
|
41
42
|
end
|
42
43
|
|
44
|
+
def drop_by_singleton_instance
|
45
|
+
singleton_instances = @uniq_map.values.select { |v| v.instance_of?(RBS::AST::Members::MethodDefinition) && v.kind == :singleton_instance }
|
46
|
+
singleton_instances.each do |member|
|
47
|
+
@uniq_map.delete([member.class, member.name, :instance])
|
48
|
+
@uniq_map.delete([member.class, member.name, :singleton])
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
43
52
|
def drop_set_method_definition
|
44
53
|
attr_accessors = @uniq_map.values.grep(RBS::AST::Members::AttrAccessor)
|
45
54
|
attr_accessors.each do |member|
|
@@ -59,18 +68,26 @@ module Orthoses
|
|
59
68
|
def drop_known_method_definition_recur(d)
|
60
69
|
d.decl.members.each do |member|
|
61
70
|
case member
|
71
|
+
when RBS::AST::Members::MethodDefinition
|
72
|
+
if member.kind == :singleton_instance
|
73
|
+
@uniq_map.delete([member.class, member.name, :instance])
|
74
|
+
@uniq_map.delete([member.class, member.name, :singleton])
|
75
|
+
end
|
76
|
+
@uniq_map.delete(member_key(member))
|
62
77
|
when RBS::AST::Members::LocationOnly
|
63
78
|
# ignore
|
64
79
|
when RBS::AST::Members::AttrAccessor
|
65
80
|
@uniq_map.delete([RBS::AST::Members::MethodDefinition, member.name, member.kind])
|
66
81
|
@uniq_map.delete([RBS::AST::Members::MethodDefinition, :"#{member.name}=", member.kind])
|
67
|
-
|
68
|
-
if member.
|
82
|
+
when RBS::AST::Members::Include
|
83
|
+
if member.name.interface?
|
69
84
|
# If interface is included, it is shared in the same namespace.
|
70
85
|
drop_known_method_definition_recur(@known_env.interface_decls[member.name])
|
71
86
|
else
|
72
87
|
@uniq_map.delete(member_key(member))
|
73
88
|
end
|
89
|
+
else
|
90
|
+
@uniq_map.delete(member_key(member))
|
74
91
|
end
|
75
92
|
end
|
76
93
|
end
|
@@ -33,10 +33,14 @@ module Orthoses
|
|
33
33
|
end
|
34
34
|
|
35
35
|
def <<(decl)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
36
|
+
begin
|
37
|
+
@load_env << decl
|
38
|
+
@known_env << decl
|
39
|
+
rescue RBS::DuplicatedDeclarationError => err
|
40
|
+
Orthoses.logger.warn(err.inspect)
|
41
|
+
end
|
42
|
+
|
43
|
+
self
|
40
44
|
end
|
41
45
|
|
42
46
|
def write_to(store:)
|
@@ -58,9 +62,13 @@ module Orthoses
|
|
58
62
|
content = Content.new(name: name)
|
59
63
|
content.comment = m_entry.primary.decl.comment&.string&.gsub(/^/, "# ")
|
60
64
|
content.header = header_builder.build(entry: m_entry, name_hint: name)
|
61
|
-
|
65
|
+
decls = m_entry.decls.map(&:decl)
|
66
|
+
decls_to_lines(decls).each do |line|
|
62
67
|
content << line
|
63
68
|
end
|
69
|
+
detect_mixin_and_build_content(decls).each do |mixin_content|
|
70
|
+
yield mixin_content
|
71
|
+
end
|
64
72
|
yield content
|
65
73
|
end
|
66
74
|
|
@@ -92,6 +100,14 @@ module Orthoses
|
|
92
100
|
end
|
93
101
|
end
|
94
102
|
|
103
|
+
def detect_mixin_and_build_content(decls)
|
104
|
+
decls.flat_map do |decl|
|
105
|
+
decl.members.grep(RBS::AST::Members::Mixin).map do |decl|
|
106
|
+
Content.new(name: decl.name.relative!.to_s)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
|
95
111
|
def decls_to_lines(decls)
|
96
112
|
out = StringIO.new
|
97
113
|
writer = RBS::Writer.new(out: out)
|
data/lib/orthoses/content.rb
CHANGED
@@ -102,19 +102,7 @@ module Orthoses
|
|
102
102
|
|
103
103
|
case val
|
104
104
|
when Class
|
105
|
-
|
106
|
-
if val.superclass && val.superclass != Object
|
107
|
-
super_module_name = Utils.module_name(val.superclass)
|
108
|
-
|
109
|
-
if super_module_name && super_module_name != "Random::Base" # https://github.com/ruby/rbs/pull/977
|
110
|
-
" < ::#{super_module_name}#{temporary_type_params(super_module_name)}"
|
111
|
-
else
|
112
|
-
nil
|
113
|
-
end
|
114
|
-
else
|
115
|
-
nil
|
116
|
-
end
|
117
|
-
self.header = "class #{Utils.module_name(val)}#{type_params(name)}#{superclass}"
|
105
|
+
self.header = "class #{Utils.module_name(val)}#{type_params(name)}#{build_super_class(val)}"
|
118
106
|
when Module
|
119
107
|
self.header = "module #{Utils.module_name(val)}#{type_params(name)}"
|
120
108
|
else
|
@@ -124,6 +112,25 @@ module Orthoses
|
|
124
112
|
|
125
113
|
private
|
126
114
|
|
115
|
+
def build_super_class(val)
|
116
|
+
return nil unless val.superclass && val.superclass != Object
|
117
|
+
|
118
|
+
super_module_name = Utils.module_name(val.superclass)
|
119
|
+
return nil unless super_module_name
|
120
|
+
|
121
|
+
begin
|
122
|
+
# check private const
|
123
|
+
eval("::#{val.superclass.to_s}")
|
124
|
+
rescue NameError
|
125
|
+
return nil
|
126
|
+
end
|
127
|
+
|
128
|
+
# https://github.com/ruby/rbs/pull/977
|
129
|
+
return nil unless super_module_name != "Random::Base"
|
130
|
+
|
131
|
+
" < ::#{super_module_name}#{temporary_type_params(super_module_name)}"
|
132
|
+
end
|
133
|
+
|
127
134
|
class ArrayIO
|
128
135
|
def initialize
|
129
136
|
@outs = []
|
@@ -10,32 +10,43 @@ module Orthoses
|
|
10
10
|
# ...
|
11
11
|
# end
|
12
12
|
class LazyTracePoint < TracePoint
|
13
|
+
METHOD_METHOD = ::Kernel.instance_method(:method)
|
14
|
+
INSTANCE_METHOD_METHOD = ::Module.instance_method(:instance_method)
|
15
|
+
UNBOUND_NAME_METHOD = ::Module.instance_method(:name)
|
16
|
+
METHOD_ADDED_HOOKS = {}
|
17
|
+
SINGLETON_METHOD_ADDED_HOOKS = {}
|
18
|
+
|
13
19
|
# for TracePoint target
|
14
|
-
|
20
|
+
module MethodAddedHook
|
15
21
|
def method_added(id)
|
22
|
+
begin
|
23
|
+
if h = METHOD_ADDED_HOOKS[id]
|
24
|
+
if mod_name = UNBOUND_NAME_METHOD.bind(self).call
|
25
|
+
h[mod_name]&.call(self, id)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
rescue TypeError => e
|
29
|
+
end
|
16
30
|
super
|
17
31
|
end
|
18
|
-
|
19
|
-
::
|
32
|
+
end
|
33
|
+
::Module.prepend MethodAddedHook
|
34
|
+
|
35
|
+
class ::BasicObject
|
36
|
+
undef singleton_method_added
|
20
37
|
def singleton_method_added(id)
|
21
|
-
|
38
|
+
begin
|
39
|
+
if h = SINGLETON_METHOD_ADDED_HOOKS[id]
|
40
|
+
if mod_name = UNBOUND_NAME_METHOD.bind(self).call
|
41
|
+
h[mod_name]&.call(self, id)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
rescue TypeError => e
|
45
|
+
end
|
22
46
|
end
|
23
|
-
})
|
24
|
-
|
25
|
-
METHOD_METHOD = ::Kernel.instance_method(:method)
|
26
|
-
INSTANCE_METHOD_METHOD = ::Module.instance_method(:instance_method)
|
27
|
-
UNBOUND_NAME_METHOD = ::Module.instance_method(:name)
|
28
|
-
METHOD_ADDED_METHOD = ::Module.instance_method(:method_added)
|
29
|
-
SINGLETON_METHOD_ADDED_METHOD = ::BasicObject.instance_method(:singleton_method_added)
|
30
|
-
|
31
|
-
def initialize(*events, &block)
|
32
|
-
@mod_name = nil
|
33
|
-
@instance_method_id = nil
|
34
|
-
@singleton_method_id = nil
|
35
|
-
super
|
36
47
|
end
|
37
48
|
|
38
|
-
def enable(target: nil,
|
49
|
+
def enable(target: nil, &block)
|
39
50
|
return super unless target.kind_of?(String)
|
40
51
|
|
41
52
|
case
|
@@ -59,43 +70,25 @@ module Orthoses
|
|
59
70
|
private
|
60
71
|
|
61
72
|
def trace_instance_method(&block)
|
62
|
-
# try to load
|
63
73
|
target = Object.const_get(@mod_name).instance_method(@instance_method_id)
|
64
74
|
enable(target: target, &block)
|
65
75
|
rescue NameError
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
mod_name = UNBOUND_NAME_METHOD.bind(tp.self).call
|
71
|
-
|
72
|
-
next unless mod_name
|
73
|
-
next unless mod_name == @mod_name
|
74
|
-
|
75
|
-
enable(target: INSTANCE_METHOD_METHOD.bind(tp.self).call(id))
|
76
|
-
tp.disable
|
77
|
-
end.enable(target: METHOD_ADDED_METHOD, &block)
|
76
|
+
(METHOD_ADDED_HOOKS[@instance_method_id] ||= {})[@mod_name] = ->(const, id) {
|
77
|
+
enable(target: INSTANCE_METHOD_METHOD.bind(const).call(id))
|
78
|
+
}
|
79
|
+
block&.call
|
78
80
|
ensure
|
79
81
|
disable
|
80
82
|
end
|
81
83
|
|
82
84
|
def trace_singleton_method(&block)
|
83
|
-
# try to load
|
84
85
|
target = Object.const_get(@mod_name).method(@singleton_method_id)
|
85
86
|
enable(target: target, &block)
|
86
87
|
rescue NameError
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
mod_name = UNBOUND_NAME_METHOD.bind(tp.self).call
|
92
|
-
|
93
|
-
next unless mod_name
|
94
|
-
next unless mod_name == @mod_name
|
95
|
-
|
96
|
-
enable(target: METHOD_METHOD.bind(tp.self).call(id))
|
97
|
-
tp.disable
|
98
|
-
end.enable(target: SINGLETON_METHOD_ADDED_METHOD, &block)
|
88
|
+
(SINGLETON_METHOD_ADDED_HOOKS[@singleton_method_id] ||= {})[@mod_name] = ->(const, id) {
|
89
|
+
enable(target: METHOD_METHOD.bind(const).call(id))
|
90
|
+
}
|
91
|
+
block&.call
|
99
92
|
ensure
|
100
93
|
disable
|
101
94
|
end
|
data/lib/orthoses/mixin.rb
CHANGED
@@ -2,19 +2,31 @@
|
|
2
2
|
|
3
3
|
module Orthoses
|
4
4
|
class Mixin
|
5
|
+
CALL_GRAPH = {}
|
6
|
+
|
5
7
|
module Hook
|
6
8
|
def include(*modules)
|
9
|
+
modules.each do |m|
|
10
|
+
(CALL_GRAPH[self]||=[]) << [:include, m]
|
11
|
+
end
|
7
12
|
super
|
8
13
|
end
|
9
14
|
def extend(*modules)
|
15
|
+
modules.each do |m|
|
16
|
+
(CALL_GRAPH[self]||=[]) << [:extend, m]
|
17
|
+
end
|
10
18
|
super
|
11
19
|
end
|
12
20
|
def prepend(*modules)
|
21
|
+
modules.each do |m|
|
22
|
+
(CALL_GRAPH[self]||=[]) << [:prepend, m]
|
23
|
+
end
|
13
24
|
super
|
14
25
|
end
|
15
26
|
end
|
16
27
|
|
17
28
|
def initialize(loader, if: nil)
|
29
|
+
CALL_GRAPH.clear
|
18
30
|
@loader = loader
|
19
31
|
@if = binding.local_variable_get(:if)
|
20
32
|
end
|
@@ -22,56 +34,34 @@ module Orthoses
|
|
22
34
|
def call
|
23
35
|
::Module.prepend(Hook)
|
24
36
|
|
25
|
-
|
26
|
-
extend = CallTracer.new
|
27
|
-
prepend = CallTracer.new
|
37
|
+
store = @loader.call
|
28
38
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
39
|
+
CALL_GRAPH.dup.each do |base_mod, mixins|
|
40
|
+
base_mod_name = Utils.module_name(base_mod) or next
|
41
|
+
content = store[base_mod_name]
|
42
|
+
mixins.each do |(how, mod)|
|
43
|
+
mod_name = Utils.module_name(mod) or next
|
44
|
+
next if mod_name.start_with?("Orthoses")
|
45
|
+
next unless @if.nil? || @if.call(base_mod, how, mod)
|
46
|
+
|
47
|
+
store[mod_name].header = "module #{mod_name}"
|
48
|
+
content << "#{how} #{mod_name}#{type_params_sig(mod)}"
|
34
49
|
end
|
35
50
|
end
|
36
51
|
|
37
|
-
collect_definitions(store, include, :include)
|
38
|
-
collect_definitions(store, extend, :extend)
|
39
|
-
collect_definitions(store, prepend, :prepend)
|
40
|
-
|
41
52
|
store
|
42
53
|
end
|
43
54
|
|
44
55
|
private
|
45
56
|
|
46
|
-
def
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
base_mod_name = Utils.module_name(base_mod)
|
52
|
-
next unless base_mod_name
|
53
|
-
next if base_mod_name.include?("#")
|
54
|
-
|
55
|
-
content = store[base_mod_name]
|
56
|
-
capture.argument[:modules].each do |mod|
|
57
|
-
mod_name = Utils.module_name(mod)
|
58
|
-
next unless mod_name
|
59
|
-
|
60
|
-
next if mod_name.start_with?("Orthoses")
|
61
|
-
|
62
|
-
type_params_sig = ""
|
63
|
-
if type_params = Utils.known_type_params(mod)
|
64
|
-
if !type_params.empty?
|
65
|
-
type_params_sig = "[#{type_params.map{"untyped"}.join(", ")}]"
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
next unless @if.nil? || @if.call(base_mod, how, mod)
|
70
|
-
|
71
|
-
store[mod_name].header = "module #{mod_name}"
|
72
|
-
content << "#{how} #{mod_name}#{type_params_sig}"
|
57
|
+
def type_params_sig(mod)
|
58
|
+
if type_params = Utils.known_type_params(mod)
|
59
|
+
if !type_params.empty?
|
60
|
+
return "[#{type_params.map{"untyped"}.join(", ")}]"
|
73
61
|
end
|
74
62
|
end
|
63
|
+
|
64
|
+
""
|
75
65
|
end
|
76
66
|
end
|
77
67
|
end
|
@@ -5,7 +5,7 @@ module Orthoses
|
|
5
5
|
class RBSPrototypeRuntime
|
6
6
|
def initialize(
|
7
7
|
loader,
|
8
|
-
patterns
|
8
|
+
patterns: nil,
|
9
9
|
method_definition_filter: nil,
|
10
10
|
alias_filter: nil,
|
11
11
|
constant_filter: nil,
|
@@ -31,9 +31,9 @@ module Orthoses
|
|
31
31
|
attribute_filter: @attribute_filter,
|
32
32
|
)
|
33
33
|
|
34
|
-
patterns = @patterns
|
34
|
+
patterns = @patterns || store.keys
|
35
35
|
env = RBS::Environment.new
|
36
|
-
merge =
|
36
|
+
merge = false
|
37
37
|
owners_included = []
|
38
38
|
RBS::Prototype::Runtime.new(
|
39
39
|
patterns: patterns,
|
@@ -3,6 +3,24 @@
|
|
3
3
|
module Orthoses
|
4
4
|
class Trace
|
5
5
|
class Attribute
|
6
|
+
module Hook
|
7
|
+
def attr(*names)
|
8
|
+
super
|
9
|
+
end
|
10
|
+
|
11
|
+
def attr_accessor(*names)
|
12
|
+
super
|
13
|
+
end
|
14
|
+
|
15
|
+
def attr_reader(*names)
|
16
|
+
super
|
17
|
+
end
|
18
|
+
|
19
|
+
def attr_writer(*names)
|
20
|
+
super
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
6
24
|
include Targetable
|
7
25
|
|
8
26
|
def initialize(loader, patterns:)
|
@@ -13,17 +31,17 @@ module Orthoses
|
|
13
31
|
end
|
14
32
|
|
15
33
|
def call
|
16
|
-
::Module.prepend(
|
17
|
-
store =
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
::Module.prepend(Hook)
|
35
|
+
store =
|
36
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr)) do
|
37
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_accessor)) do
|
38
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_reader)) do
|
39
|
+
build_trace_hook.enable(target: Hook.instance_method(:attr_writer)) do
|
40
|
+
@loader.call
|
41
|
+
end
|
23
42
|
end
|
24
43
|
end
|
25
44
|
end
|
26
|
-
end
|
27
45
|
|
28
46
|
@captured_dict.each do |mod_name, captures|
|
29
47
|
captures.each do |(kind, prefix, name), types|
|
data/lib/orthoses/utils.rb
CHANGED
data/lib/orthoses/version.rb
CHANGED
data/sig/orthoses/attribute.rbs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Attribute
|
4
|
+
@loader: Orthoses::_Call
|
4
5
|
def initialize: (Orthoses::_Call loader) -> void
|
5
6
|
def call: () -> Orthoses::store
|
6
|
-
|
7
|
-
@loader: Orthoses::_Call
|
7
|
+
CALL_GRAPH: Hash[untyped, untyped]
|
8
8
|
end
|
data/sig/orthoses/autoload.rbs
CHANGED
data/sig/orthoses/builder.rbs
CHANGED
@@ -10,6 +10,8 @@
|
|
10
10
|
# run ->() { require 'foo' }
|
11
11
|
# end
|
12
12
|
class Orthoses::Builder
|
13
|
+
@use: untyped
|
14
|
+
@runner: untyped
|
13
15
|
def initialize: () ?{ () [self: Orthoses::Builder] -> untyped } -> void
|
14
16
|
def use: (untyped middleware, *untyped args, **untyped key) ?{ (*untyped, **untyped) -> untyped } -> untyped
|
15
17
|
def run: (untyped loader) -> untyped
|
@@ -13,6 +13,8 @@
|
|
13
13
|
# capture.argument[:block]
|
14
14
|
# end
|
15
15
|
class Orthoses::CallTracer::Lazy
|
16
|
+
@captures: untyped
|
17
|
+
@lazy_trace_point: untyped
|
16
18
|
def initialize: () -> void
|
17
19
|
def trace: (String name) ?{ () -> untyped } -> untyped
|
18
20
|
attr_reader captures: Array[Orthoses::CallTracer::Capture]
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::ConstLoadError < ::StandardError
|
4
|
+
@root: untyped
|
5
|
+
@const: untyped
|
6
|
+
@error: untyped
|
4
7
|
def initialize: (root: Module, const: Symbol, error: untyped) -> void
|
5
8
|
def message: () -> ::String
|
6
9
|
attr_reader root: Module
|
data/sig/orthoses/constant.rbs
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Constant
|
4
|
-
def initialize: (Orthoses::_Call loader, ?strict: bool, ?if: ^(Module, Symbol, untyped) -> boolish | nil, ?on_error: ^(Orthoses::ConstLoadError) -> void | nil) -> void
|
5
|
-
def call: () -> Orthoses::store
|
6
4
|
@loader: Orthoses::_Call
|
7
5
|
@strict: bool
|
8
6
|
@if: ^(Module mod, Symbol const, untyped val, String rbs) -> boolish?
|
9
7
|
@on_error: ^(Orthoses::ConstLoadError) -> void | nil
|
8
|
+
def initialize: (Orthoses::_Call loader, ?strict: bool, ?if: ^(Module, Symbol, untyped) -> boolish | nil, ?on_error: ^(Orthoses::ConstLoadError) -> void | nil) -> void
|
9
|
+
def call: () -> Orthoses::store
|
10
10
|
end
|
@@ -2,9 +2,14 @@
|
|
2
2
|
|
3
3
|
# Check and drop duplication method, const etc...
|
4
4
|
class Orthoses::Content::DuplicationChecker
|
5
|
+
@decl: untyped
|
6
|
+
@known_env: untyped
|
7
|
+
@builder: untyped
|
8
|
+
@uniq_map: untyped
|
5
9
|
def initialize: (untyped decl, ?env: untyped?) -> void
|
6
10
|
def update_decl: () -> (nil | untyped)
|
7
11
|
private def uniq_members: () -> untyped
|
12
|
+
private def drop_by_singleton_instance: () -> untyped
|
8
13
|
private def drop_set_method_definition: () -> untyped
|
9
14
|
private def drop_known_method_definition: () -> untyped
|
10
15
|
private def drop_known_method_definition_recur: (untyped d) -> untyped
|
@@ -1,26 +1,27 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content::Environment
|
4
|
+
@load_env: RBS::Environment
|
5
|
+
@known_env: RBS::Environment
|
6
|
+
@method_definition_filter: method_definition_filter?
|
7
|
+
@alias_filter: alias_filter?
|
8
|
+
@constant_filter: constant_filter?
|
9
|
+
@mixin_filter: mixin_filter?
|
10
|
+
@attribute_filter: attribute_filter?
|
4
11
|
def self.load_from_paths: (untyped paths) -> untyped
|
5
12
|
def initialize: (?method_definition_filter: method_definition_filter?, ?alias_filter: alias_filter?, ?constant_filter: constant_filter?, ?mixin_filter: mixin_filter?, ?attribute_filter: attribute_filter?) -> void
|
6
|
-
def <<: (RBS::AST::Declarations::t decl) ->
|
13
|
+
def <<: (RBS::AST::Declarations::t decl) -> self
|
7
14
|
def write_to: (store: Orthoses::store) -> void
|
8
15
|
def each: () { (Orthoses::Content) -> void } -> void
|
9
16
|
# Avoid `RBS::GenericParameterMismatchError` from like rbs_prototype_rb
|
10
17
|
# class Array # <= RBS::GenericParameterMismatchError
|
11
18
|
# end
|
12
19
|
private def avoid_generic_parameter_mismatch_error: () -> untyped
|
20
|
+
private def detect_mixin_and_build_content: (untyped decls) -> untyped
|
13
21
|
private def decls_to_lines: (untyped decls) -> untyped
|
14
22
|
type method_definition_filter = ^(RBS::AST::Members::MethodDefinition) -> boolish
|
15
23
|
type alias_filter = ^(RBS::AST::Members::Alias) -> boolish
|
16
24
|
type constant_filter = ^(RBS::AST::Declarations::Constant) -> boolish
|
17
25
|
type mixin_filter = ^(RBS::AST::Members::Mixin) -> boolish
|
18
26
|
type attribute_filter = ^(RBS::AST::Members::Attribute) -> boolish
|
19
|
-
@load_env: RBS::Environment
|
20
|
-
@known_env: RBS::Environment
|
21
|
-
@method_definition_filter: method_definition_filter?
|
22
|
-
@alias_filter: alias_filter?
|
23
|
-
@constant_filter: constant_filter?
|
24
|
-
@mixin_filter: mixin_filter?
|
25
|
-
@attribute_filter: attribute_filter?
|
26
27
|
end
|
@@ -1,6 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content::HeaderBuilder
|
4
|
+
@env: untyped
|
5
|
+
@resolver: untyped
|
4
6
|
def initialize: (env: untyped) -> void
|
5
7
|
def build: (entry: untyped, ?name_hint: untyped?) -> untyped
|
6
8
|
private def build_module: (entry: untyped, ?name_hint: untyped?) -> ::String
|
data/sig/orthoses/content.rbs
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Content
|
4
|
+
@name: untyped
|
5
|
+
@body: untyped
|
6
|
+
@header: untyped
|
7
|
+
@comment: untyped
|
4
8
|
def initialize: (name: String) -> void
|
5
9
|
def <<: (String) -> void
|
6
10
|
def concat: (Array[String]) -> void
|
@@ -13,6 +17,7 @@ class Orthoses::Content
|
|
13
17
|
def sort!: () -> untyped
|
14
18
|
def original_rbs: () -> untyped
|
15
19
|
def auto_header: () -> (nil | untyped)
|
20
|
+
private def build_super_class: (untyped val) -> (nil | ::String)
|
16
21
|
private def decl_to_lines: (untyped decl) -> untyped
|
17
22
|
private def uniqed_body_string: () -> String
|
18
23
|
private def uniqed_body_decl: () -> RBS::AST::Declarations::t
|
@@ -1,7 +1,12 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::CreateFileByName
|
4
|
+
@loader: Orthoses::_Call
|
5
|
+
@to: untyped
|
6
|
+
@header: untyped
|
7
|
+
@depth: untyped
|
8
|
+
@rmtree: untyped
|
9
|
+
@if: untyped
|
4
10
|
def initialize: (Orthoses::_Call loader, to: String, ?header: String?, ?depth: Integer?, ?rmtree: boolish) -> void
|
5
11
|
def call: () -> Orthoses::store
|
6
|
-
@loader: Orthoses::_Call
|
7
12
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::DelegateClass
|
4
|
+
@loader: Orthoses::_Call
|
4
5
|
def initialize: (Orthoses::_Call loader) -> void
|
5
6
|
def call: () -> Orthoses::store
|
6
7
|
def temporary_type_params: (untyped name) -> untyped
|
7
|
-
@loader: Orthoses::_Call
|
8
8
|
end
|
data/sig/orthoses/filter.rbs
CHANGED
@@ -6,8 +6,9 @@
|
|
6
6
|
# Orthoses.rbs_defined_class?(name)
|
7
7
|
# end
|
8
8
|
class Orthoses::Filter
|
9
|
-
def initialize: (Orthoses::_Call loader) { (String, Orthoses::Content) -> boolish } -> void
|
10
|
-
def call: () -> Orthoses::store
|
11
9
|
@loader: Orthoses::_Call
|
10
|
+
@if: untyped
|
12
11
|
@block: ^(String, Orthoses::Content) -> boolish
|
12
|
+
def initialize: (Orthoses::_Call loader) { (String, Orthoses::Content) -> boolish } -> void
|
13
|
+
def call: () -> Orthoses::store
|
13
14
|
end
|
@@ -9,15 +9,15 @@
|
|
9
9
|
# ...
|
10
10
|
# end
|
11
11
|
class Orthoses::LazyTracePoint < ::TracePoint
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
def enable: (?target: untyped
|
12
|
+
@mod_name: untyped
|
13
|
+
@instance_method_id: untyped
|
14
|
+
@singleton_method_id: untyped
|
15
|
+
def enable: (?target: untyped?) ?{ () -> untyped } -> untyped
|
16
16
|
private def trace_instance_method: () ?{ () -> untyped } -> untyped
|
17
17
|
private def trace_singleton_method: () ?{ () -> untyped } -> untyped
|
18
18
|
INSTANCE_METHOD_METHOD: UnboundMethod
|
19
|
-
|
19
|
+
METHOD_ADDED_HOOKS: Hash[untyped, untyped]
|
20
20
|
METHOD_METHOD: UnboundMethod
|
21
|
-
|
21
|
+
SINGLETON_METHOD_ADDED_HOOKS: Hash[untyped, untyped]
|
22
22
|
UNBOUND_NAME_METHOD: UnboundMethod
|
23
23
|
end
|
data/sig/orthoses/load_rbs.rbs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::LoadRBS
|
4
|
+
@loader: Orthoses::_Call
|
5
|
+
@paths: paths
|
4
6
|
def initialize: (Orthoses::_Call loader, paths: paths) -> void
|
5
7
|
def call: () -> Orthoses::store
|
6
8
|
type paths = Array[String] | ^() -> Array[String]
|
7
|
-
@loader: Orthoses::_Call
|
8
|
-
@paths: paths
|
9
9
|
end
|
data/sig/orthoses/mixin.rbs
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Mixin
|
4
|
+
@loader: Orthoses::_Call
|
5
|
+
@if: untyped
|
4
6
|
def initialize: (Orthoses::_Call loader, ?if: nil | ^(Module base_mod, :include | :extend | :prepend how, Module mod) -> boolish) -> void
|
5
7
|
def call: () -> Orthoses::store
|
6
|
-
private def
|
7
|
-
|
8
|
+
private def type_params_sig: (untyped mod) -> String
|
9
|
+
CALL_GRAPH: Hash[untyped, [ :include | :extend | :prepend, untyped ]]
|
8
10
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
# AvoidRecursiveAncestorError is an internal middleware
|
4
4
|
# It's using on orthoses/outputable.rb
|
5
5
|
class Orthoses::Outputable::AvoidRecursiveAncestorError
|
6
|
+
@loader: Orthoses::_Call
|
6
7
|
def initialize: (Orthoses::_Call loader) -> void
|
7
8
|
def call: () -> Orthoses::store
|
8
9
|
private def collect_mixin_recursive: (untyped store, untyped name, untyped mixins) -> untyped
|
9
|
-
@loader: Orthoses::_Call
|
10
10
|
end
|
data/sig/orthoses/outputable.rbs
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::PathHelper
|
4
|
+
@current: untyped
|
5
|
+
@base_dir: untyped
|
4
6
|
def self.best_version_paths: (untyped current, untyped base_dir) -> untyped
|
5
7
|
def initialize: (untyped current, untyped base_dir) -> void
|
6
8
|
def best_version_paths: () -> untyped
|
data/sig/orthoses/pp.rbs
CHANGED
@@ -6,8 +6,6 @@
|
|
6
6
|
# method_definition_filter: ->(member) { false },
|
7
7
|
# alias_filter: ->(member) { false }
|
8
8
|
class Orthoses::RBSPrototypeRB
|
9
|
-
def initialize: (Orthoses::_Call loader, paths: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
|
10
|
-
def call: () -> Orthoses::store
|
11
9
|
@loader: Orthoses::_Call
|
12
10
|
@paths: Array[_ToS]
|
13
11
|
@method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
|
@@ -15,4 +13,6 @@ class Orthoses::RBSPrototypeRB
|
|
15
13
|
@constant_filter: Orthoses::Content::Environment::constant_filter?
|
16
14
|
@mixin_filter: Orthoses::Content::Environment::mixin_filter?
|
17
15
|
@attribute_filter: Orthoses::Content::Environment::attribute_filter?
|
16
|
+
def initialize: (Orthoses::_Call loader, paths: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
|
17
|
+
def call: () -> Orthoses::store
|
18
18
|
end
|
@@ -4,13 +4,13 @@
|
|
4
4
|
# use Orthoses::RBSPrototypeRuntime,
|
5
5
|
# patterns: ['Foo::*']
|
6
6
|
class Orthoses::RBSPrototypeRuntime
|
7
|
-
def initialize: (Orthoses::_Call loader, patterns: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
|
8
|
-
def call: () -> Orthoses::store
|
9
7
|
@loader: Orthoses::_Call
|
10
|
-
@patterns: Array[_ToS]
|
8
|
+
@patterns: Array[_ToS]?
|
11
9
|
@method_definition_filter: Orthoses::Content::Environment::method_definition_filter?
|
12
10
|
@alias_filter: Orthoses::Content::Environment::alias_filter?
|
13
11
|
@constant_filter: Orthoses::Content::Environment::constant_filter?
|
14
12
|
@mixin_filter: Orthoses::Content::Environment::mixin_filter?
|
15
13
|
@attribute_filter: Orthoses::Content::Environment::attribute_filter?
|
14
|
+
def initialize: (Orthoses::_Call loader, ?patterns: Array[_ToS], ?method_definition_filter: Orthoses::Content::Environment::method_definition_filter?, ?alias_filter: Orthoses::Content::Environment::alias_filter?, ?constant_filter: Orthoses::Content::Environment::constant_filter?, ?mixin_filter: Orthoses::Content::Environment::mixin_filter?, ?attribute_filter: Orthoses::Content::Environment::attribute_filter?) -> void
|
15
|
+
def call: () -> Orthoses::store
|
16
16
|
end
|
data/sig/orthoses/sort.rbs
CHANGED
data/sig/orthoses/store.rbs
CHANGED
data/sig/orthoses/tap.rbs
CHANGED
@@ -0,0 +1,11 @@
|
|
1
|
+
# THIS IS GENERATED CODE from `$ rake sig`
|
2
|
+
|
3
|
+
module Orthoses::Trace::Attribute::Hook
|
4
|
+
def attr: (*untyped names) -> untyped
|
5
|
+
|
6
|
+
def attr_accessor: (*untyped names) -> untyped
|
7
|
+
|
8
|
+
def attr_reader: (*untyped names) -> untyped
|
9
|
+
|
10
|
+
def attr_writer: (*untyped names) -> untyped
|
11
|
+
end
|
@@ -1,6 +1,9 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Trace::Attribute
|
4
|
+
@loader: untyped
|
5
|
+
@patterns: untyped
|
6
|
+
@captured_dict: untyped
|
4
7
|
def initialize: (untyped loader, patterns: untyped) -> void
|
5
8
|
def call: () -> untyped
|
6
9
|
private def build_trace_hook: () -> untyped
|
@@ -1,6 +1,11 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Trace::Method
|
4
|
+
@loader: untyped
|
5
|
+
@patterns: untyped
|
6
|
+
@stack: untyped
|
7
|
+
@args_return_map: untyped
|
8
|
+
@alias_map: untyped
|
4
9
|
def initialize: (untyped loader, patterns: untyped) -> void
|
5
10
|
def call: () -> untyped
|
6
11
|
private def build_trace_point: () -> untyped
|
data/sig/orthoses/trace.rbs
CHANGED
data/sig/orthoses/utils.rbs
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
module Orthoses::Utils
|
4
|
+
self.@env_cache: untyped
|
5
|
+
|
4
6
|
def self.unautoload!: () -> untyped
|
5
7
|
|
6
8
|
def self.each_const_recursive: (Module root, ?cache: Hash[untyped, true], ?on_error: nil | ^(Orthoses::ConstLoadError) -> void) ?{ (Module, Symbol, untyped) -> void } -> void
|
data/sig/orthoses/walk.rbs
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
class Orthoses::Walk
|
4
|
-
def initialize: (Orthoses::_Call loader, root: Module | String) -> void
|
5
|
-
def call: () -> Orthoses::store
|
6
4
|
@loader: Orthoses::_Call
|
7
5
|
@root: Module | String
|
6
|
+
def initialize: (Orthoses::_Call loader, root: Module | String) -> void
|
7
|
+
def call: () -> Orthoses::store
|
8
8
|
end
|
data/sig/orthoses/writer.rbs
CHANGED
data/sig/orthoses.rbs
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# THIS IS GENERATED CODE from `$ rake sig`
|
2
2
|
|
3
3
|
module Orthoses
|
4
|
-
|
4
|
+
INSTANCE_METHOD_METHOD: UnboundMethod
|
5
5
|
|
6
|
-
|
6
|
+
METHOD_METHOD: UnboundMethod
|
7
7
|
|
8
|
-
|
8
|
+
VERSION: String
|
9
9
|
|
10
|
-
|
10
|
+
attr_accessor self.logger: ::Logger
|
11
11
|
|
12
|
-
|
12
|
+
type store = Hash[String, Orthoses::Content]
|
13
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orthoses
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ksss
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbs
|
@@ -100,6 +100,7 @@ files:
|
|
100
100
|
- sig/orthoses/delegate_class/hook.rbs
|
101
101
|
- sig/orthoses/filter.rbs
|
102
102
|
- sig/orthoses/lazy_trace_point.rbs
|
103
|
+
- sig/orthoses/lazy_trace_point/method_added_hook.rbs
|
103
104
|
- sig/orthoses/load_rbs.rbs
|
104
105
|
- sig/orthoses/missing_name.rbs
|
105
106
|
- sig/orthoses/missing_name/missing_class.rbs
|
@@ -121,6 +122,7 @@ files:
|
|
121
122
|
- sig/orthoses/tap.rbs
|
122
123
|
- sig/orthoses/trace.rbs
|
123
124
|
- sig/orthoses/trace/attribute.rbs
|
125
|
+
- sig/orthoses/trace/attribute/hook.rbs
|
124
126
|
- sig/orthoses/trace/method.rbs
|
125
127
|
- sig/orthoses/trace/method/info.rbs
|
126
128
|
- sig/orthoses/trace/targetable.rbs
|