bootsnap 1.4.2.rc1-java → 1.4.2.rc2-java
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8d5ad54753db56bfcd3c4ff029c74314d8a2a42
|
4
|
+
data.tar.gz: c68223fa41e4ef4e2a972251d7e9dc712efa279f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d2c95079cbcd95f6143afd04d889b9677fe85e3a0661429e3f5808059bd10715ce036a4a7660a08133122897aa17d289c9f35cf258993594b8f9026ea2193d4
|
7
|
+
data.tar.gz: b7e23c0335ea3f580e7bd60d3de96823189b478fe24b75146320a012c1218f3db037b510647dda8e7885f0e702eabefaf6f5386eec406763aa35cb3fb4869ac4
|
@@ -7,6 +7,11 @@ module Bootsnap
|
|
7
7
|
DOT_SO = '.so'
|
8
8
|
SLASH = '/'
|
9
9
|
|
10
|
+
# If a NameError happens several levels deep, don't re-handle it
|
11
|
+
# all the way up the chain: mark it once and bubble it up without
|
12
|
+
# more retries.
|
13
|
+
ERROR_TAG_IVAR = :@__bootsnap_rescued
|
14
|
+
|
10
15
|
DL_EXTENSIONS = ::RbConfig::CONFIG
|
11
16
|
.values_at('DLEXT', 'DLEXT2')
|
12
17
|
.reject { |ext| !ext || ext.empty? }
|
@@ -18,11 +18,6 @@ module Bootsnap
|
|
18
18
|
Thread.current[:without_bootsnap_retry] = prev
|
19
19
|
end
|
20
20
|
|
21
|
-
# If a NameError happens several levels deep, don't re-handle it
|
22
|
-
# all the way up the chain: mark it once and bubble it up without
|
23
|
-
# more retries.
|
24
|
-
ERROR_TAG_IVAR = :@__bootsnap_rescued
|
25
|
-
|
26
21
|
module ClassMethods
|
27
22
|
def autoload_paths=(o)
|
28
23
|
super
|
@@ -65,8 +60,8 @@ module Bootsnap
|
|
65
60
|
super
|
66
61
|
end
|
67
62
|
rescue NameError => e
|
68
|
-
raise(e) if e.instance_variable_defined?(ERROR_TAG_IVAR)
|
69
|
-
e.instance_variable_set(ERROR_TAG_IVAR, true)
|
63
|
+
raise(e) if e.instance_variable_defined?(Bootsnap::LoadPathCache::ERROR_TAG_IVAR)
|
64
|
+
e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
70
65
|
|
71
66
|
# This function can end up called recursively, we only want to
|
72
67
|
# retry at the top-level.
|
@@ -89,8 +84,8 @@ module Bootsnap
|
|
89
84
|
def depend_on(*)
|
90
85
|
super
|
91
86
|
rescue LoadError => e
|
92
|
-
raise(e) if e.instance_variable_defined?(ERROR_TAG_IVAR)
|
93
|
-
e.instance_variable_set(ERROR_TAG_IVAR, true)
|
87
|
+
raise(e) if e.instance_variable_defined?(Bootsnap::LoadPathCache::ERROR_TAG_IVAR)
|
88
|
+
e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
94
89
|
|
95
90
|
# If we already had cache disabled, there's no use retrying
|
96
91
|
raise(e) if Thread.current[:without_bootsnap_cache]
|
@@ -3,6 +3,7 @@ module Bootsnap
|
|
3
3
|
module CoreExt
|
4
4
|
def self.make_load_error(path)
|
5
5
|
err = LoadError.new("cannot load such file -- #{path}")
|
6
|
+
err.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
6
7
|
err.define_singleton_method(:path) { path }
|
7
8
|
err
|
8
9
|
end
|
@@ -30,6 +31,9 @@ module Kernel
|
|
30
31
|
end
|
31
32
|
|
32
33
|
raise(Bootsnap::LoadPathCache::CoreExt.make_load_error(path))
|
34
|
+
rescue LoadError => e
|
35
|
+
e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
36
|
+
raise(e)
|
33
37
|
rescue Bootsnap::LoadPathCache::ReturnFalse
|
34
38
|
false
|
35
39
|
rescue Bootsnap::LoadPathCache::FallbackScan
|
@@ -56,6 +60,9 @@ module Kernel
|
|
56
60
|
end
|
57
61
|
|
58
62
|
raise(Bootsnap::LoadPathCache::CoreExt.make_load_error(path))
|
63
|
+
rescue LoadError => e
|
64
|
+
e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
65
|
+
raise(e)
|
59
66
|
rescue Bootsnap::LoadPathCache::ReturnFalse
|
60
67
|
false
|
61
68
|
rescue Bootsnap::LoadPathCache::FallbackScan
|
@@ -74,6 +81,9 @@ class Module
|
|
74
81
|
# added to $LOADED_FEATURES and won't be able to hook that modification
|
75
82
|
# since it's done in C-land.
|
76
83
|
autoload_without_bootsnap(const, Bootsnap::LoadPathCache.load_path_cache.find(path) || path)
|
84
|
+
rescue LoadError => e
|
85
|
+
e.instance_variable_set(Bootsnap::LoadPathCache::ERROR_TAG_IVAR, true)
|
86
|
+
raise(e)
|
77
87
|
rescue Bootsnap::LoadPathCache::ReturnFalse
|
78
88
|
false
|
79
89
|
rescue Bootsnap::LoadPathCache::FallbackScan
|
data/lib/bootsnap/version.rb
CHANGED