-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
[Patch port] fix(compiler-cli): don't type check the bodies of control flow nodes in basic mode #55558
Closed
Conversation
This file contains 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
…in basic mode Angular only checks the contents of template nodes in full type checking mode. After v17, the new control flow always had its body checked, even in basic mode, which started revealing compilation errors for apps that were using the schematic to automatically switch to the new syntax. These changes mimic the old behavior by not checking the bodies of `if`, `switch` and `for` blocks in basic mode. Note that the expressions of the blocks are still going to be checked. Fixes angular#52969.
crisbeto
added
action: review
The PR is still awaiting reviews from at least one requested reviewer
target: patch
This PR is targeted for the next patch release
area: compiler
Issues related to `ngc`, Angular's template compiler
labels
Apr 26, 2024
pkozlowski-opensource
approved these changes
Apr 26, 2024
pkozlowski-opensource
added
action: merge
The PR is ready for merge by the caretaker
and removed
action: review
The PR is still awaiting reviews from at least one requested reviewer
labels
Apr 26, 2024
crisbeto
added
merge: caretaker note
Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
and removed
merge: caretaker note
Alert the caretaker performing the merge to check the PR for an out of normal action needed or note
labels
Apr 26, 2024
Caretaker note: this is ready to go. The mergability check is taking a long time to run for some reason. |
This PR was merged into the repository by commit 51ac883. |
AndrewKushnir
pushed a commit
that referenced
this pull request
Apr 26, 2024
…in basic mode (#55558) Angular only checks the contents of template nodes in full type checking mode. After v17, the new control flow always had its body checked, even in basic mode, which started revealing compilation errors for apps that were using the schematic to automatically switch to the new syntax. These changes mimic the old behavior by not checking the bodies of `if`, `switch` and `for` blocks in basic mode. Note that the expressions of the blocks are still going to be checked. Fixes #52969. PR Close #55558
Hi, thanks for this PR. Is there some plan to manage "checkControlFlowBodies" flag state from configuration in future? |
This was referenced May 22, 2024
This was referenced May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
action: merge
The PR is ready for merge by the caretaker
area: compiler
Issues related to `ngc`, Angular's template compiler
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a port of #55360 to the patch release. I had to adjust some of the code and the tests since the TCB shape changed in v18, but the underlying logic is the same.
Angular only checks the contents of template nodes in full type checking mode. After v17, the new control flow always had its body checked, even in basic mode, which started revealing compilation errors for apps that were using the schematic to automatically switch to the new syntax.
These changes mimic the old behavior by not checking the bodies of
if
,switch
andfor
blocks in basic mode. Note that the expressions of the blocks are still going to be checked.Fixes #52969.