-
Notifications
You must be signed in to change notification settings - Fork 99
De-simplify watcher #222
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
De-simplify watcher #222
Conversation
Removing a file gives the following errors, should those be covered by this?
And after adding the same file again, the build is still hanging. Adding a new file from a new watched build, gives the following error:
Also something else I've noticed is that Sublime doesn't show the file additions/deletions when the watched build is running. Could Windows be running into some limit here? |
bdcf4c3
to
0fd9817
Compare
Alright, an update on this — even with the change I originally made here, tsc's own weirdness with directories that have
I couldn't say for certain, but historically (in my own experience at least), Sublime has never been great with filesystem events. I'm not sure if there's a near-term fix, but I'd expect this to improve when Broccoli 2 lands in ember-cli, which will allow the |
I changed my
Ok great. It was just an observation, not sure if it has anything to do with this project. Thanks, I'll keep an eye out for those improvements in ember / brocolli. 👍 |
@Bouke In that first trace, had you canceled the build, or do you get those In both cases (and just in general), if you're able to either include the contents of the Regardless, I'm glad things seem to be working for you! 🎉 |
@dfreeman yes both these errors occurred in the same watched build, when adding/removing/deleting some files. Probably the timing of these file operations was just right to trigger those errors. The build did continue and no problems seem to have occurred. We're currently working off this branch, and it all seems to be fine thus far. |
I'm going to do some local testing and then presumably merge this by the end of the week! Sorry for the delays; I've been much occupied by my primary tasks at work. |
@chriskrycho let me know if you'd like me to test anything here. |
@chriskrycho I tested out our app, using, |
The change in #196 was nice in that it simplified our code, but unfortunately it wasn't a faithful recreation of how tsc's own watcher works. It turns out we're forcing tsc to do extra work by treating every file change as a directory-level action, and we're also running into an inconsistency in how tsc deals with setting up directory watches depending on the name of the folder the project is in.
This should fix #204 and fix #221. It also supersedes #215. I've stress tested it a bit with the
type-generation
branch, andI believe between the slightly different implementation here and the change in #218, the problem that #196 was originally addressing is no longer an issue.Scratch that. Investigation underway.I'd love to confirm with at least one of @pixelhandler and/or @Bouke that this solves the rebuild issues they were having before merging.