Watch failed lookups recursively to reduce number of directory watches

Also we dont need to watch type roots any more
This commit is contained in:
Sheetal Nandi
2017-08-31 09:13:59 -07:00
parent 10ea5bf460
commit 254e39306f
7 changed files with 115 additions and 115 deletions
+6 -3
View File
@@ -297,7 +297,10 @@ namespace ts {
};
// Cache for the module resolution
const resolutionCache = createResolutionCache(compilerHost);
resolutionCache.setRootDirectory(configFileName ?
getDirectoryPath(getNormalizedAbsolutePath(configFileName, getCurrentDirectory())) :
getCurrentDirectory()
);
// There is no extra check needed since we can just rely on the program to decide emit
const builder = createBuilder(getCanonicalFileName, getFileEmitOutput, computeHash, _sourceFile => true);
@@ -576,8 +579,8 @@ namespace ts {
}
}
function watchDirectoryOfFailedLookupLocation(directory: string, cb: DirectoryWatcherCallback) {
return watchDirectory(system, directory, cb, WatchDirectoryFlags.None, writeLog);
function watchDirectoryOfFailedLookupLocation(directory: string, cb: DirectoryWatcherCallback, flags: WatchDirectoryFlags) {
return watchDirectory(system, directory, cb, flags, writeLog);
}
function watchMissingFilePath(missingFilePath: Path) {