[Bug Report] packwerk is disabling Sorbet runtime checks, globally on Spring
Korri opened this issue · 0 comments
Korri commented
Description
This line: https://github.com/Shopify/packwerk/blob/main/lib/packwerk/disable_sorbet.rb#L7 seems to be disabling Sorbet runtime checks globally when running inside Spring.
To Reproduce
Write a test like this:
def test_sorbet_error
assert_nil T.must(nil)
assert_equal :always, ::T::Private::RuntimeLevels.default_checked_level
end
Expected Behaviour
Test should fails because nil
is passed to T.must
Actual Behaviour
Test fails because ::T::Private::RuntimeLevels.default_checked_level
is :never
Version Information
- Packwerk: 3.0
Additional Context
This is while running on Shopify's dev environenent.