-
Notifications
You must be signed in to change notification settings - Fork 26.8k
fix(compiler-cli): missingStructuralDirective diagnostic produces false negatives #64470
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
Conversation
| expect(diags.length).toBe(0); | ||
| }); | ||
|
|
||
| it('should *not* produce a warning for ngIf with template references using then/else', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found this fix was needed while testing this patch on our repo
| type: 'directive', | ||
| name: 'BarDirective', | ||
| selector: '[bar]', | ||
| inputs: {bar: 'bar'}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you looked into why the test was passing when this specific input was removed ? (without the fix in).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The diagnostic doesn't even run without it - I presume it results in a template compilation error which prevents the diagnostic from running (which we don't check for in the test)
84292cb to
ca36ffa
Compare
| { | ||
| type: 'directive', | ||
| name: 'BarDirective', | ||
| selector: 'ng-template[bar]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was another issue found while testing - *cdkDragPreview matches on ng-template[cdkDragPreview]
thePunderWoman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ca36ffa to
6d6b6cc
Compare
…uces false negatives (angular#64470)" This reverts commit c1d870b.
…uces false negatives (angular#64470)" This reverts commit 371274b.
|
We had to revert it, it was breaking some projects inside G3. |
|
We had a rebase issue due to the revert, the change is now at #64579 |
|
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. |
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: #64467
What is the new behavior?
Fixes a bug in the missingStructuralDirective diagnostic where structural directives with missing imports were not reported when the element using the structural directive contained other directives
Does this PR introduce a breaking change?
I guess if this reports new issues then it would be counted as a breaking change? Maybe it should only be landed on v21 to be safe?
Other information