From e9d4e0b104307f8055f5e7023de821f1daaca9c1 Mon Sep 17 00:00:00 2001 From: Sheetal Nandi Date: Thu, 18 Apr 2019 16:04:43 -0700 Subject: [PATCH] Unchanged output time is no more required --- src/compiler/tsbuild.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/compiler/tsbuild.ts b/src/compiler/tsbuild.ts index f995b8d1b4d..ede9354165d 100644 --- a/src/compiler/tsbuild.ts +++ b/src/compiler/tsbuild.ts @@ -382,8 +382,6 @@ namespace ts { let baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); type ConfigFileCacheEntry = ParsedCommandLine | Diagnostic; const configFileCache = createFileMap(toPath); - /** Map from output file name to its pre-build timestamp */ - const unchangedOutputs = createFileMap(toPath as ToPath); /** Map from config file name to up-to-date status */ const projectStatus = createFileMap(toPath); let buildOrder: readonly ResolvedConfigFileName[] | undefined; @@ -438,7 +436,6 @@ namespace ts { options = opts; baseCompilerOptions = getCompilerOptionsOfBuildOptions(options); configFileCache.clear(); - unchangedOutputs.clear(); projectStatus.clear(); buildOrder = undefined; buildInfoChecked.clear(); @@ -697,14 +694,8 @@ namespace ts { // had its file touched but not had its contents changed - this allows us // to skip a downstream typecheck if (isDeclarationFile(output)) { - const unchangedTime = unchangedOutputs.getValue(output); - if (unchangedTime !== undefined) { - newestDeclarationFileContentChangedTime = newer(unchangedTime, newestDeclarationFileContentChangedTime); - } - else { - const outputModifiedTime = host.getModifiedTime(output) || missingFileModifiedTime; - newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime); - } + const outputModifiedTime = host.getModifiedTime(output) || missingFileModifiedTime; + newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime); } } @@ -1161,7 +1152,6 @@ namespace ts { writeFile(compilerHost, emitterDiagnostics, name, text, writeByteOrderMark); if (priorChangeTime !== undefined) { newestDeclarationFileContentChangedTime = newer(priorChangeTime, newestDeclarationFileContentChangedTime); - unchangedOutputs.setValue(name, priorChangeTime); } });