ungit crashes with rapid file system modification
See original GitHub issue(This problem has only come up for me with Rust projects, due to the nature of the build procedure)
To reproduce easily:
- create an empty Cargo project:
cargo new ungit_poc - in a new shell, run ungit in that folder:
cd ungit_poc && ungit - in the first shell, run cargo:
cargo checkorcargo build
Ungit crashes with an error similar to:
Error: ENOENT: no such file or directory, watch '<project_dir>/target/debug/deps/rmetaY6KMh5'
This happens because the target directory is extremely volatile during compilation/checking, and ungit doesn’t seem to be written in such a way that handles extremely rapid filesystem mutation.
There are two ways to fix this:
- Ensure Ungit does not attempt to watch files in .gitignore/.ignore
- Change how FSWatcher is being used so that rapid changes won’t cause this race condition
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Issues · FredrikNoren/ungit - GitHub
Anywhere. - Issues · FredrikNoren/ungit. ... Tries to watch files that have been ignored by gitignore ... ungit crashes with rapid file system...
Read more >ungit - npm
If you're running MacOSX Mavericks and Ungit crashes after a few seconds; try updating npm and node. See #259 and #249 for details....
Read more >Shared pain [LWN.net]
Well, if you define the transaction as an entity, then it gets written to its own FILE. If the system crashes then you...
Read more >File Systems Unfit as Distributed Storage Backends
By running in user space and fully controlling the I/O stack, it has enabled space-efficient metadata and data checksums, fast overwrites of erasure-coded...
Read more >File systems unfit as distributed storage backends
For a decade, the Ceph distributed file system followed the ... In 13th USENIX Conference on File and Storage Technologies (FAST 15).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

right, this seems like a bug with node-watch, where it tries to watch newly created folders but they’re already removed by the time it gets to it.
Mostl likely the bug is here https://github.com/yuanchuan/node-watch/blob/5743e51a861bfe3d372a99dd388626b324905065/lib/watch.js#L302-L317
@campbellcole would you mind opening an issue on node-watch?
@wmertens will do. Thanks for your time 😃