sorbet-runtime 0.4.4359 → 0.4.4361
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: 05e71cdbf6a346f6b83b25695e471b0530a638f3
|
4
|
+
data.tar.gz: df7b2254641f1ce3d748fff36d0e7e525c7770fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4b7dfab5359aa0e7595030bcc8179a46b5b2deaaedfb111c26a026118c8d62b03aded0872e60dee83db339598f521a176b979a3556f473466f2ee90449b767
|
7
|
+
data.tar.gz: 8fe453528019faeb30a8716c35539211ae7fb4769210ab985f268314fc9fc4ab8a49aa6a182638fee6f7151622c6104a94b508c88283ae6f19826a6d8316865c
|
@@ -86,7 +86,7 @@ module T::Private::Methods
|
|
86
86
|
raise BuilderError.new("You can't call .checked multiple times in a signature.")
|
87
87
|
end
|
88
88
|
if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
|
89
|
-
raise BuilderError.new("You can't use .checked with .
|
89
|
+
raise BuilderError.new("You can't use .checked with .on_failure.")
|
90
90
|
end
|
91
91
|
if !decl.generated.equal?(ARG_NOT_PROVIDED)
|
92
92
|
raise BuilderError.new("You can't use .checked with .generated.")
|
@@ -100,26 +100,23 @@ module T::Private::Methods
|
|
100
100
|
self
|
101
101
|
end
|
102
102
|
|
103
|
-
def
|
104
|
-
if T.unsafe(true)
|
105
|
-
raise "The .soft API is unstable, so we don't want it used until we redesign it. To change Sorbet's runtime behavior, see https://sorbet.org/docs/tconfiguration"
|
106
|
-
end
|
103
|
+
def on_failure(notify:)
|
107
104
|
check_live!
|
108
105
|
|
109
106
|
if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
|
110
|
-
raise BuilderError.new("You can't call .
|
107
|
+
raise BuilderError.new("You can't call .on_failure multiple times in a signature.")
|
111
108
|
end
|
112
109
|
if !decl.checked.equal?(ARG_NOT_PROVIDED)
|
113
|
-
raise BuilderError.new("You can't use .
|
110
|
+
raise BuilderError.new("You can't use .on_failure with .checked.")
|
114
111
|
end
|
115
112
|
if !decl.generated.equal?(ARG_NOT_PROVIDED)
|
116
|
-
raise BuilderError.new("You can't use .
|
113
|
+
raise BuilderError.new("You can't use .on_failure with .generated.")
|
117
114
|
end
|
118
115
|
|
119
116
|
# TODO consider validating that :notify is a project that sentry knows about,
|
120
117
|
# as per https://git.corp.stripe.com/stripe-internal/pay-server/blob/master/lib/event/job/sentry_job.rb#L125
|
121
118
|
if !notify || notify == ''
|
122
|
-
raise BuilderError.new("You can't provide an empty notify to .
|
119
|
+
raise BuilderError.new("You can't provide an empty notify to .on_failure().")
|
123
120
|
end
|
124
121
|
|
125
122
|
decl.soft_notify = notify
|
@@ -137,7 +134,7 @@ module T::Private::Methods
|
|
137
134
|
raise BuilderError.new("You can't use .generated with .checked.")
|
138
135
|
end
|
139
136
|
if !decl.soft_notify.equal?(ARG_NOT_PROVIDED)
|
140
|
-
raise BuilderError.new("You can't use .generated with .
|
137
|
+
raise BuilderError.new("You can't use .generated with .on_failure.")
|
141
138
|
end
|
142
139
|
|
143
140
|
decl.generated = true
|
@@ -330,7 +330,6 @@ class T::Props::Decorator
|
|
330
330
|
.void
|
331
331
|
end
|
332
332
|
def prop_defined(name, cls, rules={})
|
333
|
-
# TODO(jerry): Create similar soft assertions against false
|
334
333
|
if rules[:optional] == true
|
335
334
|
T::Configuration.hard_assert_handler(
|
336
335
|
'Use of `optional: true` is deprecated, please use `T.nilable(...)` instead.',
|