Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ivy): ensure module scope is rebuild on dependent change (#33522)
During incremental compilations, ngtsc needs to know which metadata from a previous compilation can be reused, versus which metadata has to be recomputed as some dependency was updated. Changes to directives/components should cause the NgModule in which they are declared to be recompiled, as the NgModule's compilation is dependent on its directives/components. When a dependent source file of a directive/component is updated, however, a more subtle dependency should also cause to NgModule's source file to be invalidated. During the reconciliation of state from a previous compilation into the new program, the component's source file is invalidated because one of its dependency has changed, ergo the NgModule needs to be invalidated as well. Up until now, this implicit dependency was not imposed on the NgModule. Additionally, any change to a dependent file may influence the module scope to change, so all components within the module must be invalidated as well. This commit fixes the bug by introducing additional file dependencies, as to ensure a proper rebuild of the module scope and its components. Fixes #32416 PR Close #33522
- Loading branch information
Showing
3 changed files
with
94 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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