fix(compiler-cli): check split two way binding #42601
Conversation
Great job Daniel! This looks really cool. Just a few nitpicks and a couple edge cases to consider and this should be good to go. One general nit: Prefer |
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
56c4e75
to
52f398b
3f904ca
to
64e39e9
All the code looks good to me, and I kicked off a google3 presubmit, but it looks like it has a few legitimate failures: http://test/OCL:380647145:BASE:380647172:1624306026646:e07d2f4f. Looks like there's a lot of code which two-way binds to |
I think the error should only show when the strictTemplates flag is true, I noticed that the error in the issue #39300 is only for strictTemplates, so I'll add that check. |
64e39e9
to
dc5cc60
Passing presubmit: http://test/OCL:380647145:BASE:380826857:1624379963990:c3d8b02d |
dc5cc60
to
c4187e7
Ran a global presubmit since strict templates is not widely used internally and I wanted to make sure we were checking at least some strict templates targets, everything looks good: http://test/OCL:380970929:BASE:380971055:1624432874430:81de2e8d. |
Forgot to approve after the google3 tests passed. |
Overall I think the mechanics of this PR are solid. Let's tweak the error message a bit to more accurately reflect the situation in the template, and then this should be good to go. |
c4187e7
to
77a5a35
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
Flaky failures in presubmit: http://test/OCL:382577037:BASE:382802023:1625257425653:73bd3481 forced green. |
Last round of comments - after this it should be good to go! Also, even though this is an unlikely error, it's still a new error and thus we should only land it in a |
8b1379c
to
2b837b1
Flaky failures in presubmit: http://test/OCL:382577037:BASE:383866895:1625849540387:7301e2db forced green. |
packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.ts
Outdated
Show resolved
Hide resolved
Reviewed-for: public-api |
2b837b1
to
26922ec
reviewed-for: public-api |
LGTM I left a couple of suggestions, but nothing I feel strongly about. reviewed-for: public-api |
packages/compiler-cli/src/ngtsc/typecheck/diagnostics/src/diagnostic.ts
Outdated
Show resolved
Hide resolved
packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts
Outdated
Show resolved
Hide resolved
Check for split two way binding when output is not declared to make error message clearer.
26922ec
to
ebad174
@jessicajaniuk updated relatedMessages to use for-of per a separate suggestion from Alex. |
Reviewed-for: public-api |
One final TGP looks good: http://test/OCL:384348576:BASE:384348514:1626141913210:709ae796 |
|
Check for split two way binding when output is not declared to make error message clearer.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: 39300
What is the new behavior?
The new error message for a banana-in-a-box binding with the output not declared should be "The output {outputName} for the two way binding is not declared."
Does this PR introduce a breaking change?
Other information