revert: "fix(ivy): recompile component when template changes in ngc watch mode (#33551)" (#33661)

This reverts commit 8912b11f56.

PR Close #33661
This commit is contained in:
Andrew Scott
2019-11-07 19:15:45 +00:00
parent cd8333cf0d
commit cb55f60c74
3 changed files with 6 additions and 39 deletions

View File

@ -153,7 +153,7 @@ export function performWatchCompilation(host: PerformWatchHost):
}
// Invoked to perform initial compilation or re-compilation in watch mode
function doCompilation(): Diagnostics {
function doCompilation(modifiedResourceFiles?: Set<string>): Diagnostics {
if (!cachedOptions) {
cachedOptions = host.readConfiguration();
}
@ -197,12 +197,8 @@ export function performWatchCompilation(host: PerformWatchHost):
return ce.content !;
};
// Provide access to the file paths that triggered this rebuild
cachedCompilerHost.getModifiedResourceFiles = function() {
if (timerHandleForRecompilation === undefined) {
return undefined;
}
return timerHandleForRecompilation.modifiedResourceFiles;
};
cachedCompilerHost.getModifiedResourceFiles =
modifiedResourceFiles !== undefined ? () => modifiedResourceFiles : undefined;
}
ignoreFilesForWatch.clear();
const oldProgram = cachedProgram;
@ -291,7 +287,7 @@ export function performWatchCompilation(host: PerformWatchHost):
function recompile() {
host.reportDiagnostics(
[createMessageDiagnostic('File change detected. Starting incremental compilation.')]);
doCompilation();
doCompilation(timerHandleForRecompilation !.modifiedResourceFiles);
timerHandleForRecompilation = undefined;
}
}