Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] packwerk is disabling Sorbet runtime checks, globally on Spring #325

Closed
Korri opened this issue Mar 7, 2023 · 0 comments · Fixed by #326
Closed

[Bug Report] packwerk is disabling Sorbet runtime checks, globally on Spring #325

Korri opened this issue Mar 7, 2023 · 0 comments · Fixed by #326
Labels
bug Something isn't working

Comments

@Korri
Copy link

Korri commented Mar 7, 2023

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.

@Korri Korri added the bug Something isn't working label Mar 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant