Skip to content

Conversation

@dfreeman
Copy link
Member

I worked some over the weekend on an implementation of #192, and in the process put the new watcher implementation through its paces. I found a couple scenarios (e.g. deleting a whole tree of directories) where the compiler would wind up hanging on to an orphaned reference to a file that no longer existed, and after comparing diagnostic output between our watcher and one of the default implementations, realized that their directory watcher was much more active than ours.

It seems with our chokidar setup we can forgo watchFile completely and just trigger the watchDirectory callback whenever a file within that directory changes. This eliminated all of the weird behavior I'd been seeing, and it got tsc's diagnostic output when using our watcher inline with what you'd see from the default one.

@dfreeman
Copy link
Member Author

dfreeman commented Apr 23, 2018

@tansongyang given our history with this particular code, if you happen to have a chance to try out this branch at some point before it's merged, that would be wonderful 🙂

@tansongyang
Copy link
Contributor

@dfreeman Apologies for the late response! I got back from our engineering offsite last night. I just tried this branch out and everything is A-OK.

@chriskrycho
Copy link
Member

:shipit:

extendedDiagnostics: debug.enabled
}, tsOptions);

let ts = project.require('typescript');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@jamescdavis jamescdavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested with our app and this works great!

@dfreeman
Copy link
Member Author

Great! I'll plan to merge and cut another beta release later today.

@dfreeman dfreeman merged commit 17e9901 into master Apr 27, 2018
@dfreeman dfreeman deleted the simplify-watcher branch April 27, 2018 00:15
@dfreeman dfreeman mentioned this pull request Jun 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants