fix(ivy): reuse compilation scope for incremental template changes. (#31932)
Previously if only a component template changed then we would know to rebuild its component source file. But the compilation was incorrect if the component was part of an NgModule, since we were not capturing the compilation scope information that had a been acquired from the NgModule and was not being regenerated since we were not needing to recompile the NgModule. Now we register compilation scope information for each component, via the `ComponentScopeRegistry` interface, so that it is available for incremental compilation. The `ComponentDecoratorHandler` now reads the compilation scope from a `ComponentScopeReader` interface which is implemented as a compound reader composed of the original `LocalModuleScopeRegistry` and the `IncrementalState`. Fixes #31654 PR Close #31932
This commit is contained in:

committed by
Kara Erickson

parent
7533338362
commit
eb5412d76f
@ -75,7 +75,7 @@ export class DecorationAnalyzer {
|
||||
new BaseDefDecoratorHandler(this.reflectionHost, this.evaluator, this.isCore),
|
||||
new ComponentDecoratorHandler(
|
||||
this.reflectionHost, this.evaluator, this.fullRegistry, this.fullMetaReader,
|
||||
this.scopeRegistry, this.isCore, this.resourceManager, this.rootDirs,
|
||||
this.scopeRegistry, this.scopeRegistry, this.isCore, this.resourceManager, this.rootDirs,
|
||||
/* defaultPreserveWhitespaces */ false,
|
||||
/* i18nUseExternalIds */ true, this.moduleResolver, this.cycleAnalyzer, this.refEmitter,
|
||||
NOOP_DEFAULT_IMPORT_RECORDER),
|
||||
|
Reference in New Issue
Block a user