sorbet 0.5.6225 → 0.5.6251

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b60906ffa596a3b1aabc91ffbe0ad3cc1120b1d
4
- data.tar.gz: 7e88665dc38354055e05470e1e68ce1946f41db9
3
+ metadata.gz: 9ecc728f9f34a0a647cfdf0f8eabe3b6e9cd1a9e
4
+ data.tar.gz: 207ede38c5894d3913adec9392afad5593028ec8
5
5
  SHA512:
6
- metadata.gz: d21a289f2e7a565c5e36352051825eebb7118e73797aa015fb493794c710568a7e02f2a8d4f5379e0be0885018e59bacc1377c555f7a5e09645832732b5c5b93
7
- data.tar.gz: 8db4b11d6b36d6987fc8ceef355f0052051d41cc8eac62a48f1a1a89cd097143f6a9eebda8d58cca2711ea6dbf114bbef70b6f289b072daa0679b8baad9f9550
6
+ metadata.gz: f8719fe1baf3a3b1ba7cbd1d793f1db0053e461422e5be55b5d4f4e9551d80e6fdababd84e14fb6bc9a48e649b47e7d52d3b52a7ecf3a2115b8cef9bd49da962
7
+ data.tar.gz: '09ab55f0bd13e99014e9ef94c538ed2b407c1d6b9f790273f9bfb21e42ef14c9eab7ea416a225aec2dafc76aff90959041a4dd884f19d1b6b4eaf3a6b6684cf5'
@@ -41,6 +41,16 @@ module Sorbet::Private
41
41
  Sorbet::Private::GemGeneratorTracepoint::Tracer.on_module_created(result)
42
42
  result
43
43
  end
44
+
45
+ # This is a hack due to changes in kwargs with Ruby 2.7 and 3.0. Using
46
+ # `*` for method delegation is deprecated in Ruby 2.7 and doesn't work
47
+ # in Ruby 3.0.
48
+ # See the "compatible delegation" section in this blog post:
49
+ # https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
50
+ #
51
+ # Once Sorbet supports exclusively 2.7+ we can remove ruby2_keywords and
52
+ # use the `...` delegation syntax instead.
53
+ send(:ruby2_keywords, :new) if respond_to?(:ruby2_keywords, true)
44
54
  end
45
55
  Class.prepend(ClassOverride)
46
56
 
@@ -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-white-list 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?
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-black-list=3506',
133
+ '--suppress-error-code=3506',
134
134
  # Method redefined with mismatched argument is ok since sometime
135
135
  # people monkeypatch over method
136
- '--error-black-list=4010',
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-black-list=4012',
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-black-list=4015',
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
- BLACKLIST = Set.new([
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 BLACKLIST.include?([klass.object_id, name])
361
+ next if DENYLIST.include?([klass.object_id, name])
362
362
  next if name.start_with?('<') && name.end_with?('>')
363
363
 
364
364
  begin
@@ -4,7 +4,7 @@
4
4
  require 'bigdecimal'
5
5
 
6
6
  class Sorbet::Private::Serialize
7
- BLACKLIST_CONSTANTS = [
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 BLACKLIST_CONSTANTS.include?([class_name, const_sym])
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 blacklisted_method(method)
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 blacklisted_method(method)
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 blacklisted_method(method)
198
+ def denylisted_method(method)
199
199
  method.name =~ /__validator__[0-9]{8}/ || method.name =~ /.*:.*/
200
200
  end
201
201
 
@@ -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-white-list=7022', '--typed=strict', '--silence-dev-message', '-a'],
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.6225
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-21 00:00:00.000000000 Z
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.6225
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.6225
26
+ version: 0.5.6251
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement