Skip to content

Conversation

@atscott
Copy link
Contributor

@atscott atscott commented Aug 27, 2024

This change updates the timers used in the coalescing and hybrid mode schedulers to run in the zone above Angular rather than the root zone. Running the timers in the root zone makes them impossible to flush when using fakeAsync and also may make them invisible to other zones in the hierarchy that might have desirable behaviors such as task/perf tracking.

fixes #56767

BREAKING CHANGE: The timers that are used for zone coalescing and hybrid mode scheduling (which schedules an application state synchronization when changes happen outside the Angular zone) will now run in the zone above Angular rather than the root zone. This will mostly affect tests which use fakeAsync: these timers will now be visible to fakeAsync and can be affected by tick or flush.

This change updates the timers used in the coalescing and hybrid mode
schedulers to run in the zone above Angular rather than the root zone.
Running the timers in the root zone makes them impossible to flush when
using `fakeAsync` and also may make them invisible to other zones in the
hierarchy that might have desirable behaviors such as task/perf tracking.

fixes angular#56767

BREAKING CHANGE: The timers that are used for zone coalescing and hybrid
mode scheduling (which schedules an application state synchronization
when changes happen outside the Angular zone) will now run in the zone
above Angular rather than the root zone. This will mostly affect tests
which use `fakeAsync`: these timers will now be visible to `fakeAsync`
and can be affected by `tick` or `flush`.
@atscott atscott added the target: major This PR is targeted for the next major release label Aug 27, 2024
@angular-robot angular-robot bot added detected: breaking change PR contains a commit with a breaking change area: core Issues related to the framework runtime labels Aug 27, 2024
@ngbot ngbot bot added this to the Backlog milestone Aug 27, 2024
@atscott atscott added the action: merge The PR is ready for merge by the caretaker label Aug 27, 2024
@alxhub
Copy link
Member

alxhub commented Aug 27, 2024

This PR was merged into the repository by commit 226a67d.

The changes were merged into the following branches: main

@alxhub alxhub closed this in 226a67d Aug 27, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker area: core Issues related to the framework runtime detected: breaking change PR contains a commit with a breaking change target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

eventCoalescing breaks things in a fakeAsync test

2 participants