sorbet 0.5.6249 → 0.5.6251
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hidden-definition-finder.rb +7 -7
- data/lib/serialize.rb +5 -5
- data/lib/suggest-typed.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ecc728f9f34a0a647cfdf0f8eabe3b6e9cd1a9e
|
4
|
+
data.tar.gz: 207ede38c5894d3913adec9392afad5593028ec8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8719fe1baf3a3b1ba7cbd1d793f1db0053e461422e5be55b5d4f4e9551d80e6fdababd84e14fb6bc9a48e649b47e7d52d3b52a7ecf3a2115b8cef9bd49da962
|
7
|
+
data.tar.gz: '09ab55f0bd13e99014e9ef94c538ed2b407c1d6b9f790273f9bfb21e42ef14c9eab7ea416a225aec2dafc76aff90959041a4dd884f19d1b6b4eaf3a6b6684cf5'
|
@@ -116,7 +116,7 @@ class Sorbet::Private::HiddenMethodFinder
|
|
116
116
|
)
|
117
117
|
File.write(SOURCE_CONSTANTS, io.read)
|
118
118
|
io.close
|
119
|
-
raise "Your source can't be read by Sorbet.\nYou can try `find . -type f | xargs -L 1 -t bundle exec srb tc --no-config --error-
|
119
|
+
raise "Your source can't be read by Sorbet.\nYou can try `find . -type f | xargs -L 1 -t bundle exec srb tc --no-config --isolate-error-code 1000` and hopefully the last file it is processing before it dies is the culprit.\nIf not, maybe the errors in this file will help: #{SOURCE_CONSTANTS_ERR}" if File.read(SOURCE_CONSTANTS).empty?
|
120
120
|
|
121
121
|
puts "Printing #{TMP_RBI}'s symbol table into #{RBI_CONSTANTS}"
|
122
122
|
io = IO.popen(
|
@@ -130,16 +130,16 @@ class Sorbet::Private::HiddenMethodFinder
|
|
130
130
|
# The hidden-definition serializer is not smart enough to put T::Enum
|
131
131
|
# constants it discovers inside an `enums do` block. We probably want
|
132
132
|
# to come up with a better long term solution here.
|
133
|
-
'--error-
|
133
|
+
'--suppress-error-code=3506',
|
134
134
|
# Method redefined with mismatched argument is ok since sometime
|
135
135
|
# people monkeypatch over method
|
136
|
-
'--error-
|
136
|
+
'--suppress-error-code=4010',
|
137
137
|
# Redefining constant is needed because we serialize things both as
|
138
138
|
# aliases and in-class constants.
|
139
|
-
'--error-
|
139
|
+
'--suppress-error-code=4012',
|
140
140
|
# Invalid nesting is ok because we don't generate all the intermediate
|
141
141
|
# namespaces for aliases
|
142
|
-
'--error-
|
142
|
+
'--suppress-error-code=4015',
|
143
143
|
'--stdout-hup-hack',
|
144
144
|
'--silence-dev-message',
|
145
145
|
'--no-error-count',
|
@@ -344,7 +344,7 @@ class Sorbet::Private::HiddenMethodFinder
|
|
344
344
|
|
345
345
|
# These methods are defined in C++ and we want our C++ definition to
|
346
346
|
# win instead of a shim.
|
347
|
-
|
347
|
+
DENYLIST = Set.new([
|
348
348
|
[Class.object_id, "new"],
|
349
349
|
[BasicObject.object_id, "initialize"],
|
350
350
|
]).freeze
|
@@ -358,7 +358,7 @@ class Sorbet::Private::HiddenMethodFinder
|
|
358
358
|
name = rbi_entry["name"]["name"]
|
359
359
|
next if source_by_name[name]
|
360
360
|
|
361
|
-
next if
|
361
|
+
next if DENYLIST.include?([klass.object_id, name])
|
362
362
|
next if name.start_with?('<') && name.end_with?('>')
|
363
363
|
|
364
364
|
begin
|
data/lib/serialize.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
require 'bigdecimal'
|
5
5
|
|
6
6
|
class Sorbet::Private::Serialize
|
7
|
-
|
7
|
+
DENYLIST_CONSTANTS = [
|
8
8
|
['DidYouMean', :NameErrorCheckers], # https://github.com/yuki24/did_you_mean/commit/b72fdbe194401f1be21f8ad7b6e3f784a0ad197d
|
9
9
|
['Net', :OpenSSL], # https://github.com/yuki24/did_you_mean/commit/b72fdbe194401f1be21f8ad7b6e3f784a0ad197d
|
10
10
|
]
|
@@ -112,7 +112,7 @@ class Sorbet::Private::Serialize
|
|
112
112
|
[const_sym, value]
|
113
113
|
end
|
114
114
|
constants += get_constants(klass, false).uniq.map do |const_sym|
|
115
|
-
next if
|
115
|
+
next if DENYLIST_CONSTANTS.include?([class_name, const_sym])
|
116
116
|
next if Sorbet::Private::ConstantLookupCache::DEPRECATED_CONSTANTS.include?("#{class_name}::#{const_sym}")
|
117
117
|
begin
|
118
118
|
value = klass.const_get(const_sym, false)
|
@@ -160,7 +160,7 @@ class Sorbet::Private::Serialize
|
|
160
160
|
ret << "# #{e}\n"
|
161
161
|
next
|
162
162
|
end
|
163
|
-
next if
|
163
|
+
next if denylisted_method(method)
|
164
164
|
next if ancestor_has_method(method, klass)
|
165
165
|
serialize_method(method)
|
166
166
|
end
|
@@ -172,7 +172,7 @@ class Sorbet::Private::Serialize
|
|
172
172
|
ret << "# #{e}\n"
|
173
173
|
next
|
174
174
|
end
|
175
|
-
next if
|
175
|
+
next if denylisted_method(method)
|
176
176
|
next if ancestor_has_method(method, Sorbet::Private::RealStdlib.real_singleton_class(klass))
|
177
177
|
serialize_method(method, true)
|
178
178
|
end
|
@@ -195,7 +195,7 @@ class Sorbet::Private::Serialize
|
|
195
195
|
true
|
196
196
|
end
|
197
197
|
|
198
|
-
def
|
198
|
+
def denylisted_method(method)
|
199
199
|
method.name =~ /__validator__[0-9]{8}/ || method.name =~ /.*:.*/
|
200
200
|
end
|
201
201
|
|
data/lib/suggest-typed.rb
CHANGED
@@ -40,7 +40,7 @@ class Sorbet::Private::SuggestTyped
|
|
40
40
|
|
41
41
|
def self.suggest_typed
|
42
42
|
IO.popen(
|
43
|
-
[File.realpath("#{__dir__}/../bin/srb"), 'tc', '--suggest-typed', '--error-
|
43
|
+
[File.realpath("#{__dir__}/../bin/srb"), 'tc', '--suggest-typed', '--isolate-error-code=7022', '--typed=strict', '--silence-dev-message', '-a'],
|
44
44
|
err: [:child, :out],
|
45
45
|
) do |io|
|
46
46
|
out = io.read
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sorbet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.6251
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sorbet-static
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.5.
|
19
|
+
version: 0.5.6251
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.5.
|
26
|
+
version: 0.5.6251
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|