From 08b295603c3a7508e3637e6c640e22fe33246877 Mon Sep 17 00:00:00 2001 From: Chuck Jazdzewski Date: Fri, 8 Apr 2016 16:53:35 -0700 Subject: [PATCH] fix(7987): Incremental build works with new trees Closes #7989 --- tools/broccoli/broccoli-typescript.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/broccoli/broccoli-typescript.ts b/tools/broccoli/broccoli-typescript.ts index f97bcbc6b9..637b519a05 100644 --- a/tools/broccoli/broccoli-typescript.ts +++ b/tools/broccoli/broccoli-typescript.ts @@ -106,7 +106,7 @@ class DiffingTSCompiler implements DiffingBroccoliPlugin { this.fileRegistry[tsFilePath].version++; } - pathsToEmit.push(tsFilePath); + pathsToEmit.push(path.join(this.inputPath, tsFilePath)); }); treeDiff.removedPaths.forEach((tsFilePath) => { @@ -332,7 +332,10 @@ class CustomLanguageServiceHost implements ts.LanguageServiceHost { getScriptVersion(fileName: string): string { - return this.fileRegistry[fileName] && this.fileRegistry[fileName].version.toString(); + if (startsWith(fileName, this.treeInputPath)) { + const key = fileName.substr(this.treeInputPath.length + 1); + return this.fileRegistry[key] && this.fileRegistry[key].version.toString(); + } }