ICU source spans and type checking#39072
Conversation
fb3dc09 to
55d481b
Compare
There was a problem hiding this comment.
This seems a strange ordering. What is the algorithm for this?
There was a problem hiding this comment.
I was surprised too! I didn't deep dive into it, but the nested ICU had been collapsed into the outer ICU datastructure where nestedVar comes before item.var in the list of vars, surprisingly.
AndrewKushnir
left a comment
There was a problem hiding this comment.
LGTM, just one proposal to add tests for nested ICUs. Thanks @JoostK 👍
kyliau
left a comment
There was a problem hiding this comment.
LGTM for language service
Prior to this change, expressions within ICUs would have a source span corresponding with the whole ICU. This commit narrows down the source spans of these expressions to the exact location in the source file, as a prerequisite for reporting type check errors within these expressions.
This commit adds tests for locating expressions within ICU expressions.
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. BREAKING CHANGE: Expressions within ICUs are now type-checked again, fixing a regression in Ivy. This may cause compilation failures if errors are found in expressions that appear within an ICU. Please correct these expressions to resolve the type-check errors. Fixes angular#39064
This commit adds tests for locating expressions within ICU expressions. PR Close #39072
Expressions within ICU expressions in templates were not previously type-checked, as they were skipped while traversing the elements within a template. This commit enables type checking of these expressions by actually visiting the expressions. BREAKING CHANGE: Expressions within ICUs are now type-checked again, fixing a regression in Ivy. This may cause compilation failures if errors are found in expressions that appear within an ICU. Please correct these expressions to resolve the type-check errors. Fixes #39064 PR Close #39072
|
@JoostK in the company we're using pug with Changing one template throws a lot of errors from nowhere I'm wondering what's happening :( |
|
@matheo that is unrelated to this change, as this only landed on master (for v11) and only affects type-checking, not parsing. The issue you're seeing is angular/angular-cli#18290, where the forked type-checker process does not use Webpack, so any custom loader is disregarded. Disabling the forked type checker should do the trick, although I'm not sure why you only started seeing problems now as this has been the case for a while. |
|
@JoostK I was aware of the not so pertinent comment, |
|
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. |


See individual commits.