perf(compiler): skip type check and emit in bazel in some cases. (#19646)

If no user files changed:
- only type check the changed generated files

Never emit non changed generated files
- we still calculate them, but don’t send them through
  TypeScript to emit them but cache the written files instead.
PR Close #19646
This commit is contained in:
Tobias Bosch
2017-10-10 13:45:42 -07:00
committed by Chuck Jazdzewski
parent 3acf9c7063
commit a22121d65d
21 changed files with 596 additions and 297 deletions

View File

@ -40,7 +40,7 @@ export interface PerformWatchHost {
reportDiagnostics(diagnostics: Diagnostics): void;
readConfiguration(): ParsedConfiguration;
createCompilerHost(options: api.CompilerOptions): api.CompilerHost;
createEmitCallback(options: api.CompilerOptions): api.TsEmitCallback|undefined;
createEmitCallback(options: api.CompilerOptions): api.EmitCallback|undefined;
onFileChange(
options: api.CompilerOptions, listener: (event: FileChangeEvent, fileName: string) => void,
ready: () => void): {close: () => void};
@ -51,7 +51,7 @@ export interface PerformWatchHost {
export function createPerformWatchHost(
configFileName: string, reportDiagnostics: (diagnostics: Diagnostics) => void,
existingOptions?: ts.CompilerOptions, createEmitCallback?: (options: api.CompilerOptions) =>
api.TsEmitCallback | undefined): PerformWatchHost {
api.EmitCallback | undefined): PerformWatchHost {
return {
reportDiagnostics: reportDiagnostics,
createCompilerHost: options => createCompilerHost({options}),