Skip to content

Commit f3e14b9

Browse files
committed
fix: remove TSC_NONPOLLING_WATCHER env variable
`TSC_NONPOLLING_WATCHER` was used back in the early days to improve file watcher performance, but it prevents files / directories from being moved / renamed. Since TS now provides built-in option to configure file watcher, this environment variable is no longer needed. See https://www.typescriptlang.org/docs/handbook/configuring-watch.html Fix #750
1 parent b121725 commit f3e14b9

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

client/src/client.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -283,10 +283,7 @@ function constructArgs(ctx: vscode.ExtensionContext, debug: boolean): string[] {
283283

284284
function getServerOptions(ctx: vscode.ExtensionContext, debug: boolean): lsp.NodeModule {
285285
// Environment variables for server process
286-
const prodEnv = {
287-
// Force TypeScript to use the non-polling version of the file watchers.
288-
TSC_NONPOLLING_WATCHER: true,
289-
};
286+
const prodEnv = {};
290287
const devEnv = {
291288
...prodEnv,
292289
NG_DEBUG: true,

integration/lsp/test_utils.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ export function createConnection(serverOptions: ServerOptions): MessageConnectio
3737
}
3838
const server = fork(SERVER_PATH, argv, {
3939
cwd: PROJECT_PATH,
40-
env: {
41-
TSC_NONPOLLING_WATCHER: 'true',
42-
},
4340
// uncomment to debug server process
4441
// execArgv: ['--inspect-brk=9330']
4542
});

server/src/server.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,5 @@ session.info(`Log file: ${logger.getLogFileName()}`);
5050
if (process.env.NG_DEBUG === 'true') {
5151
session.info('Angular Language Service is running under DEBUG mode');
5252
}
53-
if (process.env.TSC_NONPOLLING_WATCHER !== 'true') {
54-
session.warn(`Using less efficient polling watcher. Set TSC_NONPOLLING_WATCHER to true.`);
55-
}
5653

5754
session.listen();

0 commit comments

Comments
 (0)