fix(compiler): recover from structural errors in watch mode (#19953)
This also changes the compiler so that we throw less often on structural changes and produce a meaningful state in the `ng.Program` in case of errors. Related to #19951 PR Close #19953
This commit is contained in:

committed by
Matias Niemelä

parent
18e9d86a3b
commit
957be960d2
@ -191,6 +191,10 @@ export function performWatchCompilation(host: PerformWatchHost):
|
||||
};
|
||||
}
|
||||
ingoreFilesForWatch.clear();
|
||||
const oldProgram = cachedProgram;
|
||||
// We clear out the `cachedProgram` here as a
|
||||
// program can only be used as `oldProgram` 1x
|
||||
cachedProgram = undefined;
|
||||
const compileResult = performCompilation({
|
||||
rootNames: cachedOptions.rootNames,
|
||||
options: cachedOptions.options,
|
||||
|
Reference in New Issue
Block a user