Skip to content

Conversation

@AndrewKushnir
Copy link
Contributor

@AndrewKushnir AndrewKushnir commented Nov 23, 2024

This commit removes a custom whenStable util in favor of standard ApplicationRef.whenStable API.

There is also an important difference between the custom whenStable function and ApplicationRef.whenStable implementation: the whenStable was caching the "stable" promise on per-ApplicationRef basis, which resulted in unexpected behavior with zoneless, when some code ended up getting a stale resolved promise, when an application was not stable yet, this causing order of operations issues. This commit also has an extra test that covers that case.

Does this PR introduce a breaking change?

  • Yes
  • No

@AndrewKushnir AndrewKushnir added action: review The PR is still awaiting reviews from at least one requested reviewer area: core Issues related to the framework runtime target: patch This PR is targeted for the next patch release labels Nov 23, 2024
@ngbot ngbot bot modified the milestone: Backlog Nov 23, 2024
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 23, 2024
…til function

This commit removes a custom `whenStable` util in favor of standard `ApplicationRef.whenStable` API.

There is also an important different between the custom `whenStable` function and `ApplicationRef.whenStable` implementation: the `whenStable` was caching the "stable" promise on per-ApplicationRef basis, which resulted in unexpected behavior with zoneless, when some code ended up getting a stale resolved promise, when an application was not stable yet, this causing order of operations issues. This commit also has an extra test that covers that case.
@angular-robot angular-robot bot added area: core Issues related to the framework runtime and removed area: core Issues related to the framework runtime labels Nov 23, 2024
@ngbot ngbot bot modified the milestone: Backlog Nov 23, 2024
Copy link
Contributor

@alan-agius4 alan-agius4 left a comment

Choose a reason for hiding this comment

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

LGTM

@sheikalthaf
Copy link
Contributor

@AndrewKushnir @alan-agius4 I removed the same on angular cli based on the comments angular/angular-cli#28944

@AndrewKushnir AndrewKushnir added action: presubmit The PR is in need of a google3 presubmit and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 25, 2024
@AndrewKushnir AndrewKushnir removed the request for review from thePunderWoman November 25, 2024 05:56
@AndrewKushnir
Copy link
Contributor Author

Presubmit.

@AndrewKushnir
Copy link
Contributor Author

I removed the same on angular cli based on the comments angular/angular-cli#28944

@sheikalthaf thanks for your help!

@AndrewKushnir AndrewKushnir added action: merge The PR is ready for merge by the caretaker and removed action: presubmit The PR is in need of a google3 presubmit labels Nov 25, 2024
thePunderWoman pushed a commit that referenced this pull request Nov 25, 2024
…til function (#58834)

This commit removes a custom `whenStable` util in favor of standard `ApplicationRef.whenStable` API.

There is also an important different between the custom `whenStable` function and `ApplicationRef.whenStable` implementation: the `whenStable` was caching the "stable" promise on per-ApplicationRef basis, which resulted in unexpected behavior with zoneless, when some code ended up getting a stale resolved promise, when an application was not stable yet, this causing order of operations issues. This commit also has an extra test that covers that case.

PR Close #58834
@thePunderWoman
Copy link
Contributor

This PR was merged into the repository by commit 7f6f5f9.

The changes were merged into the following branches: main, 19.0.x

@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 Dec 26, 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 target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants