provide way to disable T.let / T.cast for production setups and debugging #3279
Labels
enhancement
New feature or surprising current feature
runtime
Related to the sorbet-runtime gem
unconfirmed
This issue has not yet been confirmed by the Sorbet team
It seems there's no way to disable
T.let
andT.cast
globally.This might be helpful when running code in production setups because of two reasons:
T.let
/T.cast
may be time consuming (see below)Additionally a miminal
T.let
/T.cast
codepath might be helpful when debugging (if there's a method call insideT.let(...,
which you want to step into). Sadly sorbet-unwrap won't help here. (see also AaronC81/pry-sorbet#5)To solve this problems for method signatures (
sig { ... }
) one can simply set:T::Configuration.default_checked_level = :never
There seems to be no such setting for
T.let
/T.cast
.There's just a hacky workaround I know of.
QUESTION: Is there any counter argument to do this in productive code?
Note: The local
checked
setting isn't helpful to set a global behavior.Example: slow
Example: ignore problems when introducing Sorbet
The text was updated successfully, but these errors were encountered: