FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(core): keep running sibling root effects after one throws by erkamyaman · Pull Request #71154 · angular/angular · GitHub

Repository navigation

fix(core): keep running sibling root effects after one throws - #71154

Open
erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-root-effect-sibling-starvation
Open

erkamyaman wants to merge 1 commit into
angular:mainfrom
erkamyaman:fix-root-effect-sibling-starvation

Conversation

Copy link
Copy Markdown
Contributor

If one root effect throws, the flush loop stops and every effect after it silently stops working, it never runs again until some other effect happens to trigger a new flush. There's even a // TODO: what happens if this throws an error? sitting on that exact line. This catches the error, reports it to the app error handler, and keeps going, so one broken effect no longer takes its siblings down with it. Scoped to the root effect scheduler.

pullapprove Bot requested a review from crisbeto October 3, 2026 10:02
angular-robot Bot added the area: core Issues related to the framework runtime label Oct 3, 2026
ngbot Bot added this to the Backlog milestone Oct 3, 2026
`ZoneAwareEffectScheduler.flushQueue` ran each scheduled effect with an
unguarded call, so an effect that threw aborted the flush and left every
effect queued after it dirty but unreached. Because `synchronizeOnce`
clears the `RootEffects` dirty flag before flushing, nothing re-raised a
flush for the stranded effects, and they stopped reacting to their
dependencies until an unrelated effect happened to trigger another flush.

Report the error to the application error handler and continue the loop,
resolving the long-standing TODO in this file.
erkamyaman force-pushed the fix-root-effect-sibling-starvation branch from a9fbd69 to 26990af Compare October 4, 2026 19:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Issues related to the framework runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL