-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix: allow users to disable the sanity checks #4178
Conversation
this._checkDoctype(); | ||
this._checkTheme(); | ||
hasDoneGlobalChecks = true; | ||
ngZone.runOutsideAngular(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we gate on being on the browser platform here rather than in the individual checks as well?
(no reason the timeout has to run on platform-server)
d3fb8cf
to
4c850c7
Compare
Addressed the feedback @jelbourn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will move the run-time sanity checks from CompatibilityModule to here once angular#4178 is merged.
I will move the run-time sanity checks from CompatibilityModule to here once angular#4178 is merged.
I will move the run-time sanity checks from CompatibilityModule to here once angular#4178 is merged.
Follow-up: this PR makes ~60 different projects' unit tests start timing out. Strange, since the call is done with |
It might be because a lot of timeouts are still being spawned in the background. We could go down the safer route and allow users to disable the checks, instead of delaying them? |
@crisbeto yeah, I think so now Probably via a provided token |
Allows users to disable the Material sanity checks, by providing a value for the `MATERIAL_SANITY_CHECKS` token: ```ts @NgModule({ providers: [ {provide: MATERIAL_SANITY_CHECKS, useValue: false} ] // other config }); ``` Fixes angular#4125.
4c850c7
to
b2a1606
Compare
Re-did this as discussed @jelbourn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I will move the run-time sanity checks from CompatibilityModule to here once #4178 is merged.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Allows users to disable the Material sanity checks, by providing a value for the
MATERIAL_SANITY_CHECKS
token:Fixes #4125.