-
Notifications
You must be signed in to change notification settings - Fork 26.6k
fix(core): Ensure application remains unstable during bootstrap #62631
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
Conversation
This commit ensures the application remains unstable during the entire bootstrap process. This ensures all bootstrap listeners and app initializers observe the application as being unstable until each one has gotten a chance to execute the synchronous block (potentially adding more pending tasks). Prior to this commit, application initializers or bootstrap listeners may observe the application as being stable, even though other initializers/listeners had not yet executed. This created an ordering issue whereby the hydration bootstrap listener would observe the application as stable prior to the router performing its initial navigation. fixes angular#62592
cab77d0
to
5794976
Compare
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!
This PR was merged into the repository by commit 859958d. The changes were merged into the following branches: main, 20.1.x |
This commit ensures the application remains unstable during the entire bootstrap process. This ensures all bootstrap listeners and app initializers observe the application as being unstable until each one has gotten a chance to execute the synchronous block (potentially adding more pending tasks). Prior to this commit, application initializers or bootstrap listeners may observe the application as being stable, even though other initializers/listeners had not yet executed. This created an ordering issue whereby the hydration bootstrap listener would observe the application as stable prior to the router performing its initial navigation. fixes #62592 PR Close #62631
Updates the approach from angular#62631 to use Promise.finally for task removal. This is a bit cleaner and also handles rejections from the donePromise
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. |
This commit ensures the application remains unstable during the entire bootstrap process. This ensures all bootstrap listeners and app initializers observe the application as being unstable until each one has gotten a chance to execute the synchronous block (potentially adding more pending tasks).
Prior to this commit, application initializers or bootstrap listeners may observe the application as being stable, even though other initializers/listeners had not yet executed. This created an ordering issue whereby the hydration bootstrap listener would observe the application as stable prior to the router performing its initial navigation.
fixes #62592