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

Suppress call validation errors during CLI run #331

Merged
merged 1 commit into from
May 25, 2021

Conversation

paracycle
Copy link
Member

Motivation

The way we modify generic types means we sometimes are not able to properly validate inline checks or call signatures. For that reason, Tapioca tries to run with most stuff turned off.

However, there is a call validation that happens inside T::Props::Private::SetterFactory#build_setter_proc which does not respect the default_checked_level value.

Implementation

To suppress those errors from being raised at runtime in production, we need to explicitly suppress call validation errors by setting a no-op handler.

Tests

No tests.

@paracycle paracycle requested review from ttonelli and a team May 25, 2021 22:03
@paracycle paracycle force-pushed the uk-suppress-call-validation-handlers branch from 4e57362 to aa25182 Compare May 25, 2021 22:04
The way we modify generic types means we sometimes are not able to
properly validate inline checks or call signatures. For that reason,
Tapioca tries to run with most stuff turned off.

However, there is a call validation that happens inside
`T::Props::Private::SetterFactory#build_setter_proc` which does not
respect the `default_checked_level` value. Thus, to suppress those
errors from being raised at runtime in production, we need to explicitly
suppress call validation errors by setting a no-op handler.
@paracycle paracycle force-pushed the uk-suppress-call-validation-handlers branch from aa25182 to 6553803 Compare May 25, 2021 22:37
@paracycle paracycle merged commit e293185 into master May 25, 2021
@paracycle paracycle deleted the uk-suppress-call-validation-handlers branch May 25, 2021 22:43
@shopify-shipit shopify-shipit bot temporarily deployed to production May 25, 2021 22:53 Inactive
Copy link
Contributor

@ttonelli ttonelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants