sorbet 0.5.5716 → 0.5.5742

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: 8299fdee4709a979d486278ed8f65c4278b0bace
4
- data.tar.gz: a69b0111705cfd5d29e28048466efbcb40784572
3
+ metadata.gz: f889910b3fbd36b27eeda6cdf07873a3039a1f27
4
+ data.tar.gz: 59cbc71fcc87fc60dc3f74fcd90453924eb1ab97
5
5
  SHA512:
6
- metadata.gz: 9d993e2468bd77618e4759b8f8b5ea110d384086183febc37a17c9fc3cce5da1654117b0c0278bbaef353ac21fd8566777112c8e1bed3de088a278ed43c644ef
7
- data.tar.gz: 6fa36b8219e894685baa72aaaa6b30582e18edb452b4ecbb72c05836a60cb6cdb2f57c453485d548515f944ee67c76e98dd6eaeda96299ae9b0477b613311e0a
6
+ metadata.gz: '0856b25c8d9f05f508cff9140b128b4764c880e0d80ae9183f7e4e6ec54a7c412fd3884375b785799941daa77621f0d0126cacc09e516e0afe7510d3dbf9c2e5'
7
+ data.tar.gz: baab275dbfde17e5484fa975c5b59e9f728d2384d9f4d51d20f5f4634e1ab5556fb36580507f9929b00aaa165bd4b3850b7ec21244cecdf03869540509a98d8f
@@ -97,7 +97,27 @@ class Sorbet::Private::ConstantLookupCache
97
97
 
98
98
  @all_constants.map do |_key, struct|
99
99
  next if struct.nil? || !Sorbet::Private::RealStdlib.real_is_a?(struct.const, Module) || struct.aliases.size < 2
100
- ret[struct.primary_name] = struct.aliases.reject {|name| name == struct.primary_name}
100
+ if struct.owner != nil
101
+ ret[struct.primary_name] = struct.aliases.reject do |name|
102
+ # ignore the primary
103
+ next true if name == struct.primary_name
104
+
105
+ prefix, _, _ = name.rpartition('::')
106
+
107
+ # an alias that exists at the top-level
108
+ next false if prefix == ""
109
+
110
+ # if the prefix is the same syntactically, then this is a good alias
111
+ next false if prefix == struct.owner.primary_name
112
+
113
+ # skip the alias if the owner is the same
114
+ other_owner_const = Sorbet::Private::RealStdlib.real_const_get(Object, prefix, false)
115
+ struct.owner.const == other_owner_const
116
+ end
117
+ else
118
+ # top-level names
119
+ ret[struct.primary_name] = struct.aliases.reject {|name| name == struct.primary_name }
120
+ end
101
121
  end
102
122
  ret
103
123
  end
@@ -155,6 +175,7 @@ class Sorbet::Private::ConstantLookupCache
155
175
  if maybe_seen_already
156
176
  if nested_name != maybe_seen_already.primary_name
157
177
  maybe_seen_already.aliases << nested_name
178
+ maybe_seen_already.owner = owner
158
179
  end
159
180
  if maybe_seen_already.primary_name.nil? && Sorbet::Private::RealStdlib.real_is_a?(nested_constant, Module)
160
181
  realName = Sorbet::Private::RealStdlib.real_name(nested_constant)
@@ -109,6 +109,8 @@ class Sorbet::Private::HiddenMethodFinder
109
109
  '--stdout-hup-hack',
110
110
  '--silence-dev-message',
111
111
  '--no-error-count',
112
+ '-e', # this is additive with any files / dirs
113
+ '""',
112
114
  ],
113
115
  err: SOURCE_CONSTANTS_ERR
114
116
  )
@@ -117,6 +117,8 @@ class Sorbet::Private::RequireEverything
117
117
  "--stop-after=parser",
118
118
  "--silence-dev-message",
119
119
  "--no-error-count",
120
+ "-e",
121
+ "''",
120
122
  ]) {|io| io.read}
121
123
  # This returns a hash with structure:
122
124
  # { files:
@@ -130,7 +132,8 @@ class Sorbet::Private::RequireEverything
130
132
  # ]
131
133
  # }
132
134
  parsed = JSON.parse(output)
133
- parsed['files']
135
+ parsed
136
+ .fetch('files', [])
134
137
  .reject{|file| ["Ignore", "Stdlib"].include?(file["strict"])}
135
138
  .map{|file| file["path"]}
136
139
  .select{|path| File.file?(path)} # Some files have https:// paths. We ignore those here.
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.5716
4
+ version: 0.5.5742
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-02 00:00:00.000000000 Z
11
+ date: 2020-06-10 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.5716
19
+ version: 0.5.5742
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.5716
26
+ version: 0.5.5742
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement