[Patch port] fix(compiler-cli): don't type check the bodies of control flow nodes in basic mode#55558
Closed
crisbeto wants to merge 1 commit intoangular:17.3.xfrom
Closed
[Patch port] fix(compiler-cli): don't type check the bodies of control flow nodes in basic mode#55558crisbeto wants to merge 1 commit intoangular:17.3.xfrom
crisbeto wants to merge 1 commit intoangular:17.3.xfrom
Conversation
…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.
pkozlowski-opensource
approved these changes
Apr 26, 2024
Member
Author
|
Caretaker note: this is ready to go. The mergability check is taking a long time to run for some reason. |
Contributor
|
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
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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,switchandforblocks in basic mode. Note that the expressions of the blocks are still going to be checked.Fixes #52969.