From 5fa7bec22688fd81c191abc430ecb7424abf144b Mon Sep 17 00:00:00 2001 From: Zhengbo Li Date: Thu, 10 Dec 2015 17:52:25 -0800 Subject: [PATCH] revert back to polling watching for approaching release --- src/compiler/sys.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 5482e549eb..0cb0258de3 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -352,7 +352,7 @@ namespace ts { // to increase the chunk size or decrease the interval // time dynamically to match the large reference set? const pollingWatchedFileSet = createPollingWatchedFileSet(); - const watchedFileSet = createWatchedFileSet(); + // const watchedFileSet = createWatchedFileSet(); function isNode4OrLater(): Boolean { return parseInt(process.version.charAt(1)) >= 4; @@ -456,7 +456,8 @@ namespace ts { // and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649 // and https://github.com/Microsoft/TypeScript/issues/4643), therefore // if the current node.js version is newer than 4, use `fs.watch` instead. - let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + // let fileSet = isNode4OrLater() ? watchedFileSet : pollingWatchedFileSet; + let fileSet = pollingWatchedFileSet; const watchedFile = fileSet.addFile(fileName, callback); return { close: () => fileSet.removeFile(watchedFile)