Skip to content
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(compiler): changed after checked error in for loops #52935

Closed

Conversation

crisbeto
Copy link
Member

Reworks the repeater instruction to go through advance, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes #52885.

@crisbeto crisbeto 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 area: compiler Issues related to `ngc`, Angular's template compiler labels Nov 15, 2023
@ngbot ngbot bot modified the milestone: Backlog Nov 15, 2023
@crisbeto crisbeto force-pushed the 52885/for-changed-after-checked branch from ed8355f to 7f916aa Compare November 15, 2023 18:26
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes angular#52885.
@crisbeto crisbeto force-pushed the 52885/for-changed-after-checked branch from 7f916aa to f585011 Compare November 15, 2023 18:37
@crisbeto crisbeto removed the request for review from dylhunn November 15, 2023 20:22
@crisbeto crisbeto added action: merge The PR is ready for merge by the caretaker merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Nov 15, 2023
@crisbeto
Copy link
Member Author

Caretaker note: there are a handful of failing targets in the presubmit, but they're all in one app that isn't using the new control flow at all and they appear to be unrelated.

@jessicajaniuk
Copy link
Contributor

This PR was merged into the repository by commit ec2d6e7.

jessicajaniuk pushed a commit that referenced this pull request Nov 15, 2023
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes #52885.

PR Close #52935
Copy link
Contributor

@dylhunn dylhunn left a comment

Choose a reason for hiding this comment

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

Thank you for fixing template pipeline :)

tbondwilkinson pushed a commit to tbondwilkinson/angular that referenced this pull request Dec 6, 2023
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes angular#52885.

PR Close angular#52935
@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 17, 2023
ChellappanRajan pushed a commit to ChellappanRajan/angular that referenced this pull request Jan 23, 2024
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes angular#52885.

PR Close angular#52935
rlmestre pushed a commit to rlmestre/angular that referenced this pull request Jan 26, 2024
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes angular#52885.

PR Close angular#52935
amilamen pushed a commit to amilamen/angular that referenced this pull request Jan 26, 2024
Reworks the `repeater` instruction to go through `advance`, instead of passing in the index directly. This ensures that lifecycle hooks run at the right time and that we don't throw "changed after checked" errors when we shouldn't be.

Fixes angular#52885.

PR Close angular#52935
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: compiler Issues related to `ngc`, Angular's template compiler area: core Issues related to the framework runtime merge: caretaker note Alert the caretaker performing the merge to check the PR for an out of normal action needed or note target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@for ExpressionChangedAfterItHasBeenCheckedError
4 participants