Skip to content

Extended diagnostics do not run on structural directive attributes #57094

Description

@crisbeto

This came up while I was working on #57033. The visitor that is meant to visit every expression in a template currently skips over the templateAttrs (see). This is incorrect, because the templateAttrs don't get copied over into the element node for something like <div *ngIf="expr"></div>. As a result, our current extended diagnostics haven't been checking the expressions of structural directives. In #57033 I tried fixing it, but there were a lot of failures even for the trial run so I expect a lot more for a global one.

As a workaround in #57033, I've added a flag that allows the problematic diagnostics to retain their old behavior, but eventually we should remove the canVisitStructuralAttributes flag and resolve the failures.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions