test(compiler-cli): improve testing harness for incremental compilation (#25275)

In tsc 3.0 the check that enables program structure reuse in tryReuseStructureFromOldProgram has changed
and now uses identity comparison on arrays within CompilerOptions. Since we recreate the options
on each incremental compilation, we now fail this check.

After this change the default set of options is reused in between incremental compilations, but we still
allow options to be overriden if needed.

PR Close #25275
This commit is contained in:
Igor Minar
2018-08-21 16:27:44 -07:00
committed by Matias Niemelä
parent ab32ac6bb7
commit 317d40d879
3 changed files with 87 additions and 79 deletions

View File

@ -393,9 +393,6 @@ export class TsCompilerAotCompilerTypeCheckHostAdapter implements ts.CompilerHos
getSourceFile(
fileName: string, languageVersion: ts.ScriptTarget,
onError?: ((message: string) => void)|undefined): ts.SourceFile {
if (fileName.endsWith('@angular/core/src/di/injection_token.d.ts')) {
debugger;
}
// Note: Don't exit early in this method to make sure
// we always have up to date references on the file!
let genFileNames: string[] = [];