sorbet 0.5.5685 → 0.5.5730
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/bin/srb +1 -1
- data/lib/constant_cache.rb +22 -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: d0274dfa532171030b9beff35bba55fb038eb1f6
|
4
|
+
data.tar.gz: 816a05fe5db48cce0c4f054f13caf39b266d5f47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf48e96a5c0dbfc554475fcdb48809517bb777033e8d9e836cfe7ed58a16f11d167c292ebba6bb14ea4eebc42378a575b88236ea308c0d72cfebf49cf812984b
|
7
|
+
data.tar.gz: f18c4ee66c85cebdd470809c59d32d5bc4cb0f142859b2d172cf3bf5b4158281f60970fe5ed84b9d5225308c7998ad9cdc232052014db9671a0a0a20795292ec
|
data/bin/srb
CHANGED
@@ -47,7 +47,7 @@ typecheck() {
|
|
47
47
|
args=("$@")
|
48
48
|
cache_dir="${XDG_CACHE_HOME:-$HOME/.cache}/sorbet/gem-rbis"
|
49
49
|
|
50
|
-
if [ -f Gemfile.lock ]; then
|
50
|
+
if [ -z "$SRB_SKIP_GEM_RBIS" ] && [ -f Gemfile.lock ]; then
|
51
51
|
[ -d "$cache_dir" ] || mkdir -p "$cache_dir"
|
52
52
|
cache_hash=$(compute_md5 Gemfile.lock | awk '{ print $1 }')
|
53
53
|
cache_file="${cache_dir}/${cache_hash}"
|
data/lib/constant_cache.rb
CHANGED
@@ -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
|
-
|
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)
|
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.5730
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stripe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-04 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.5730
|
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.5730
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|