Skip to content

fix(compiler-cli): Ignore diagnostics on ngTemplateContextGuard lines…#63054

Closed
atscott wants to merge 1 commit intoangular:mainfrom
atscott:contextguard
Closed

fix(compiler-cli): Ignore diagnostics on ngTemplateContextGuard lines…#63054
atscott wants to merge 1 commit intoangular:mainfrom
atscott:contextguard

Conversation

@atscott
Copy link
Copy Markdown
Contributor

@atscott atscott commented Aug 7, 2025

… in TCB

Deprecated diagnostics can appear on the context guard becaues the directive itself may be deprecated.

For example, context guards look like if (i1.NgForOf.ngTemplateContextGuard(_t8, _t9) /*331,378*/) {...} and typescript will report the deprecation on the whole element, from start to end tag, because the span for that node includes it.

fixes angular/vscode-ng-language-service#2203

… in TCB

Deprecated diagnostics can appear on the context guard becaues the
directive itself may be deprecated.

For example, context guards look like `if (i1.NgForOf.ngTemplateContextGuard(_t8, _t9) /*331,378*/) {...}`
and typescript will report the deprecation on the whole element, from
start to end tag, because the span for that node includes it.

fixes angular/vscode-ng-language-service#2203
@angular-robot angular-robot bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Aug 7, 2025
@atscott atscott added target: patch This PR is targeted for the next patch release and removed area: compiler Issues related to `ngc`, Angular's template compiler labels Aug 7, 2025
@ngbot ngbot bot modified the milestone: Backlog Aug 7, 2025
@atscott atscott added target: minor This PR is targeted for the next minor release action: merge The PR is ready for merge by the caretaker and removed target: patch This PR is targeted for the next patch release labels Aug 7, 2025
@atscott
Copy link
Copy Markdown
Contributor Author

atscott commented Aug 7, 2025

This PR was merged into the repository by commit 812463c.

The changes were merged into the following branches: main

@atscott atscott closed this in 812463c Aug 7, 2025
@angular-automatic-lock-bot
Copy link
Copy Markdown

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

action: merge The PR is ready for merge by the caretaker target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Entire element is marked deprecated when directive with context guard is used

2 participants