When a file is recreated for atomic writes, the watcher stops working. Additionally, when write events are received, it could be that we fire and read the file before the full file content has been written.
I am not sure yet what the best path forward here is, either trying to fix it by making sure we keep listening even if the inode is destroyed (maybe by watching the directory it's in?), or by putting in some debouncing of write events, or if we should just say we remove the watcher feature, but the current state seems very unexpected to me.
When a file is recreated for atomic writes, the watcher stops working. Additionally, when write events are received, it could be that we fire and read the file before the full file content has been written.
I am not sure yet what the best path forward here is, either trying to fix it by making sure we keep listening even if the inode is destroyed (maybe by watching the directory it's in?), or by putting in some debouncing of write events, or if we should just say we remove the watcher feature, but the current state seems very unexpected to me.
/cc @sourcegraph/source