Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new node recursive file watching in tsserver #4643

Closed
mhegazy opened this issue Sep 4, 2015 · 5 comments
Closed

Use new node recursive file watching in tsserver #4643

mhegazy opened this issue Sep 4, 2015 · 5 comments
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript Fixed A PR has been merged for this issue

Comments

@mhegazy
Copy link
Contributor

mhegazy commented Sep 4, 2015

courtesy of @billti

Recursive directory watching for Windows and OSX is landing in node master: nodejs/node#2649

This enables watching a folder recursively on Windows (was already available on OS X). Under the covers this is a change in libuv (which abstracts away the OS) and uses the ‘watchSubtree’ option on the Win32 ReadDirectoryChanges function – so it should be highly reliable. (libuv change viewable here).

@mhegazy mhegazy added Bug A bug in TypeScript API Relates to the public API for TypeScript labels Sep 4, 2015
@dhusemann
Copy link

Looks like it will be in node.js 4.0 and backported to IO.js 3.3.1.

@zhengbli
Copy link
Contributor

That means we can get rid of our own pollling mechanism currently in use for file watching? What about users who uses a lower node version?

@mhegazy
Copy link
Contributor Author

mhegazy commented Sep 24, 2015

We should do feature detection. I think it is fine for new features like watching directories for new files to work on node 4 only.

@zhengbli
Copy link
Contributor

Another question is, where should we start the directory watching? If we start from the root level (e.g. "C:"), we will have to respond to a lot of system file changing events (temp file creating, other app updating their files, OneDrive syncing etc.) that is pure noise to us; if we start from the current path, we may miss when the user adds a tsconfig file in an upper level directory.

@zhengbli
Copy link
Contributor

Fixed with #5127

@mhegazy mhegazy added the Fixed A PR has been merged for this issue label Oct 15, 2015
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API Relates to the public API for TypeScript Bug A bug in TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants