Repository navigation
Conversation
JoostK
force-pushed
the
ngtsc-tcb-positions
branch
12 times, most recently
from
May 7, 2019 19:28
5984d25 to
9554fcc
Compare
JoostK
force-pushed
the
ngtsc-tcb-positions
branch
2 times, most recently
from
May 21, 2019 19:57
b4d3e38 to
6ad4eaa
Compare
This was referenced Jun 10, 2019
Closed
JoostK
force-pushed
the
ngtsc-tcb-positions
branch
3 times, most recently
from
June 13, 2019 20:19
4ece719 to
d5abb83
Compare
JoostK
force-pushed
the
ngtsc-tcb-positions
branch
3 times, most recently
from
July 11, 2019 21:01
9a86513 to
fa50663
Compare
The type check blocks (TCB) that ngtsc generates for achieving type checking of Angular templates needs to be annotated with positional information in order to translate TypeScript's diagnostics for the TCB code back to the location in the user's template. This commit augments the TCB by attaching trailing comments with AST nodes, such that a node can be traced back to its source location.
Template AST nodes for (bound) attributes, variables and references will now retain a reference to the source span of their value, which allows for more accurate type check diagnostics.
JoostK
force-pushed
the
ngtsc-tcb-positions
branch
from
July 25, 2019 20:27
e43832e to
dd11406
Compare
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
JoostK
marked this pull request as ready for review
July 25, 2019 21:10
Member
alxhub
approved these changes
Jul 25, 2019
Member
|
Caretaker: it won't accept a force green of the g3 bit (too many statuses?) but the failure is a flake - please merge anyway. |
JoostK
added a commit
to JoostK/angular
that referenced
this pull request
Jul 26, 2019
In angular#30181, several testcases were added that were failing in Windows. The reason was that a recent rebase missed a required change to interact with the compiler's virtualized filesystems. This commit introduces the required usage of the VFS layer to fix the testcase.
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…angular#30181) The type check blocks (TCB) that ngtsc generates for achieving type checking of Angular templates needs to be annotated with positional information in order to translate TypeScript's diagnostics for the TCB code back to the location in the user's template. This commit augments the TCB by attaching trailing comments with AST nodes, such that a node can be traced back to its source location. PR Close angular#30181
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
…es (angular#30181) Template AST nodes for (bound) attributes, variables and references will now retain a reference to the source span of their value, which allows for more accurate type check diagnostics. PR Close angular#30181
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
sabeersulaiman
pushed a commit
to sabeersulaiman/angular
that referenced
this pull request
Sep 6, 2019
In angular#30181, several testcases were added that were failing in Windows. The reason was that a recent rebase missed a required change to interact with the compiler's virtualized filesystems. This commit introduces the required usage of the VFS layer to fix the testcase. PR Close angular#31860
|
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.
Currently, the template type checking that is done by the Ivy compiler
reports diagnostics that refer to a synthetic
__ng_typecheck__.tsfile,so interpreting the diagnostics and finding the root cause is quite a
challenge.
This PR enables the ability to translate the diagnostics from the type-check
phase back to their original source location.
TODO:
KNOWN ISSUE:
Computing the start of an
ASTexpression with respect to aParseSourceSpanhas turned out to be inaccurate. The problem is that source spans are computed with trivia skipping (since #30095) whereas the parsed AST still includes the whitespace. Moreover, the whitespace removal of text nodes messes up the offsets of interpolations, affecting the parse spans of expression AST nodes.As an example, consider the following template:
Here, the source span of the Text node would start at 2:4. The text node itself however would originally start at 1:5 with the AST expression having an offset of 7, and after whitespace removal will have an offset of 3 (one space remains plus the width of the interpolation opening
{{). When the AST's offset of 3 is applied to the source span 2:4, the reconstructed span is computed to start at 2:7 which should be 2:6. With whitespace removal disabled it would be even further off.