sorbet-runtime 0.5.11358 → 0.5.11366

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
  SHA256:
3
- metadata.gz: d236c518f9e5a3892e62cbc3bb572f7d742f8892625839613b937c88c2c495b8
4
- data.tar.gz: 062777ad4f7c17d356ac38b3d42e4bd9746e4fd890dc1c8872b90477c45efb36
3
+ metadata.gz: 1d874e56653a8c57e9270c9930a4dff5aa0acc61946d03c7375b31cc63111d7a
4
+ data.tar.gz: c5055439fa4a97a49dfc9b087569210976d5367a9fbd666157929789ac781944
5
5
  SHA512:
6
- metadata.gz: 903a6d264e26541d6d0cf1cf01830b67bbcf29b523d0c5e22bfe8ad000794324dfb70bcb81d4cd133e15272c5941a5faa6480f2b80f56e2646a28a29725ae7b4
7
- data.tar.gz: 2f26f7265056dea207b3dd4e3fa98d674109929513bb85e5bca4b21ba034fe1151fa29f18cfe4a94f2903d447d3618eaa9bb989241d41d876a66664b3eef41cb
6
+ metadata.gz: cb451f625728a28cb2c0936c4c1bced1a45013475fb77999c3f73a44f91f41625da8b821088b0dd586e1d004802fc67bd76598c185add750d269dcf65a8a4b91
7
+ data.tar.gz: 5658793420bb954acebaaf058737c14ea83f6c096afdce547f2d474f458aa29094b4ffa3c4769a5ee07e467a1ee64849bcb98e4ea57728f21c0bb5007a3c1fc1
@@ -117,6 +117,3 @@ require_relative 'types/struct'
117
117
  require_relative 'types/non_forcing_constants'
118
118
 
119
119
  require_relative 'types/compatibility_patches'
120
-
121
- # Sorbet Compiler support module
122
- require_relative 'types/private/compiler'
@@ -113,7 +113,7 @@ module T::Configuration
113
113
  # statically, so that methods don't have to guard themselves from being
114
114
  # called incorrectly by untyped code.
115
115
  #
116
- # @param [:never, :compiled, :tests, :always] default_checked_level
116
+ # @param [:never, :tests, :always] default_checked_level
117
117
  def self.default_checked_level=(default_checked_level)
118
118
  T::Private::RuntimeLevels.default_checked_level = default_checked_level
119
119
  end
@@ -101,7 +101,7 @@ module T::Private::Methods
101
101
  if !decl.checked.equal?(ARG_NOT_PROVIDED)
102
102
  raise BuilderError.new("You can't call .checked multiple times in a signature.")
103
103
  end
104
- if (level == :never || level == :compiled) && !decl.on_failure.equal?(ARG_NOT_PROVIDED)
104
+ if level == :never && !decl.on_failure.equal?(ARG_NOT_PROVIDED)
105
105
  raise BuilderError.new("You can't use .checked(:#{level}) with .on_failure because .on_failure will have no effect.")
106
106
  end
107
107
  if !T::Private::RuntimeLevels::LEVELS.include?(level)
@@ -119,7 +119,7 @@ module T::Private::Methods
119
119
  if !decl.on_failure.equal?(ARG_NOT_PROVIDED)
120
120
  raise BuilderError.new("You can't call .on_failure multiple times in a signature.")
121
121
  end
122
- if decl.checked == :never || decl.checked == :compiled
122
+ if decl.checked == :never
123
123
  raise BuilderError.new("You can't use .on_failure with .checked(:#{decl.checked}) because .on_failure will have no effect.")
124
124
  end
125
125
 
@@ -222,7 +222,7 @@ module T::Private::Methods
222
222
  end
223
223
  if decl.checked.equal?(ARG_NOT_PROVIDED)
224
224
  default_checked_level = T::Private::RuntimeLevels.default_checked_level
225
- if (default_checked_level == :never || default_checked_level == :compiled) && !decl.on_failure.equal?(ARG_NOT_PROVIDED)
225
+ if default_checked_level == :never && !decl.on_failure.equal?(ARG_NOT_PROVIDED)
226
226
  raise BuilderError.new("To use .on_failure you must additionally call .checked(:tests) or .checked(:always), otherwise, the .on_failure has no effect.")
227
227
  end
228
228
  decl.checked = default_checked_level
@@ -234,7 +234,7 @@ module T::Private::Methods::SignatureValidation
234
234
  return if signature.override_allow_incompatible
235
235
  return if super_signature.mode == Modes.untyped
236
236
  return unless [signature, super_signature].all? do |sig|
237
- sig.check_level == :always || sig.check_level == :compiled || (sig.check_level == :tests && T::Private::RuntimeLevels.check_tests?)
237
+ sig.check_level == :always || (sig.check_level == :tests && T::Private::RuntimeLevels.check_tests?)
238
238
  end
239
239
  mode_noun = super_signature.mode == Modes.abstract ? 'implementation' : 'override'
240
240
 
@@ -12,9 +12,6 @@ module T::Private::RuntimeLevels
12
12
  # Don't even validate in tests, b/c too expensive,
13
13
  # or b/c we fully trust the static typing
14
14
  :never,
15
- # Validate the sig when the file is using the Sorbet Compiler.
16
- # Behaves like :never when interpreted.
17
- :compiled,
18
15
  ].freeze
19
16
 
20
17
  @check_tests = false
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sorbet-runtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.11358
4
+ version: 0.5.11366
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stripe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-26 00:00:00.000000000 Z
11
+ date: 2024-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -159,7 +159,6 @@ files:
159
159
  - lib/types/private/caller_utils.rb
160
160
  - lib/types/private/casts.rb
161
161
  - lib/types/private/class_utils.rb
162
- - lib/types/private/compiler.rb
163
162
  - lib/types/private/decl_state.rb
164
163
  - lib/types/private/final.rb
165
164
  - lib/types/private/methods/_methods.rb
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
- # typed: true
3
-
4
- module T::Private
5
- module Compiler
6
- # If this code ever runs, the caller is running interpreted (or the
7
- # compiler didn't see the call to `running_compiled?` statically.)
8
- #
9
- # The Sorbet Compiler replaces calls to this method unconditionally (no
10
- # runtime guards) to return `true` when compiling a file.
11
- def self.running_compiled?
12
- false
13
- end
14
-
15
- # Returns `nil` because the compiler isn't running.
16
- #
17
- # The Sorbet Compiler replaces calls to this method unconditionally (no
18
- # runtime guards) to return a String showing the Sorbet Compiler's version
19
- # string.
20
- def self.compiler_version
21
- nil
22
- end
23
- end
24
- end