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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2b1e8c1fd45fe06fefe7d3f963844361ce24611e
4
- data.tar.gz: d7ee0c4b805680c5f5da04a45276b0583139a634
3
+ metadata.gz: 5fb5d2b28ef8ba9e3da543ec36508c787129dde4
4
+ data.tar.gz: 9ab0133e5ab9652fcd839462fd975101f6b02412
5
5
  SHA512:
6
- metadata.gz: ed2b3353f16be3732c4ee26a98bfddd6e451620d6b2d061ea021d35ab4e0163d6701b2c062cf39b5e624814ad1128ee5f45e9152cbbfcd3d04d71e40dd1e0e03
7
- data.tar.gz: 16f9c1d5468429c3ebeadce07fd63b3568fde1a707b172fd632ece82faafd7623b8a4736a207bfd43651f68fa9b0781f2b754d7036f8a38c5c969b2229759860
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
- # Hey there!
5
+ # From the static system, T::Utils::RuntimeProfiled is T.untyped.
6
6
  #
7
- # T::Utils::Runtime is just a random class. Chances are[^1] it's not a class
8
- # that your variables are instances of, which means that using it in a type
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
- # At first, it doesn't seem like a good thing to have a type that's sole
12
- # purpose is to cause type errors. The trick is that within the ruby-types
13
- # team, we only use T::Utils::RuntimeProfiled within 'generated' sigs.
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
- # Unlike normal sigs, generated sigs never raise at runtime. They also log the
16
- # actual, observed type on type error to a central location. We're using these
17
- # observed types to refine and expand our type coverage in pay-server.
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
- # What does this all mean for you?
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4346
4
+ version: 0.4.4347
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe