sorbet-runtime 0.4.4346 → 0.4.4347
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/lib/types/private/methods/decl_builder.rb +0 -3
- data/lib/types/runtime_profiled.rb +11 -23
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fb5d2b28ef8ba9e3da543ec36508c787129dde4
|
|
4
|
+
data.tar.gz: 9ab0133e5ab9652fcd839462fd975101f6b02412
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c52e070829b42091dcbe13c22ecca0d6bafd70c5b838855b0994f71ce93ca3a1463f1f704755d09c73443e4ea865fa378aaac0e7d68192b554cb68d8aa32540b
|
|
7
|
+
data.tar.gz: '058b90d8a1c4ca8ef9c8aff3bf9836dd02da977d2899d9a9ee1e1b5ba1b1a1679534bce9eec37cabf0cb36dde0b7dac0ffa8c92208300f7d9f6d4811091ca5dd'
|
|
@@ -131,9 +131,6 @@ module T::Private::Methods
|
|
|
131
131
|
end
|
|
132
132
|
|
|
133
133
|
def generated
|
|
134
|
-
if T.unsafe(true)
|
|
135
|
-
raise "The .generated 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"
|
|
136
|
-
end
|
|
137
134
|
check_live!
|
|
138
135
|
|
|
139
136
|
if !decl.generated.equal?(ARG_NOT_PROVIDED)
|
|
@@ -2,35 +2,23 @@
|
|
|
2
2
|
# frozen_string_literal: true
|
|
3
3
|
|
|
4
4
|
#
|
|
5
|
-
#
|
|
5
|
+
# From the static system, T::Utils::RuntimeProfiled is T.untyped.
|
|
6
6
|
#
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
# signature will always create a type error.
|
|
7
|
+
# But from the runtime system, it's a random class (specifically, a class that
|
|
8
|
+
# normal programs currently don't have any instances of).
|
|
10
9
|
#
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
#
|
|
10
|
+
# Thus, T::Utils::RuntimeProfiled can be used to introduce runtime-only type
|
|
11
|
+
# errors. This seems like a bad idea, but it's not. It can be used to gather
|
|
12
|
+
# runtime type information from running code via a custom T::Configuration
|
|
13
|
+
# handler.
|
|
14
14
|
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
17
|
-
#
|
|
15
|
+
# This process has only ever been used at Stripe, and is likely to have rough
|
|
16
|
+
# edges. If you've managed to find your way here and you're curious to try it,
|
|
17
|
+
# please chat with us on Slack. There are no docs.
|
|
18
18
|
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
# - If you were just curious, that's it! Leave the sig as is, and carry on.
|
|
22
|
-
# - If you wanted to replace this sig with a better, hand-authored one:
|
|
23
|
-
#
|
|
24
|
-
# 1. Remove 'generated' from the sig.
|
|
25
|
-
# 2. Update the sig to your liking
|
|
26
|
-
#
|
|
27
|
-
# Questions? :portal-to: => #ruby-types
|
|
28
|
-
#
|
|
29
|
-
# [^1]: Unless you happen to be calling T::Utils::RuntimeProfiled.new directly...
|
|
19
|
+
# See also: the --suggest-runtime-profiled flag to sorbet.
|
|
30
20
|
#
|
|
31
21
|
|
|
32
22
|
module T; end
|
|
33
23
|
module T::Utils; end
|
|
34
|
-
# Sorbet guesses this type instead of T.untyped when passed --suggest-runtime-profiled
|
|
35
|
-
|
|
36
24
|
class T::Utils::RuntimeProfiled; end
|