Description: While testing the microcks import --watch command, I noticed that file changes are only detected on the first save when editing specs in editors like VS Code or IntelliJ. After the initial save, subsequent saves are ignored and the watcher no longer triggers imports.
Expected Behavior : The watcher should continue monitoring the file and trigger imports on every save.
Actual behavior : The watch appears to be lost after the first save, so later modifications are ignored silently.
Possible cause: It looks related to how some editors perform atomic saves by writing to a temporary file and renaming it over the original file. In that case, fsnotify emits Rename/Remove events instead of only Write, and the existing watch may get dropped without being re-registered.
Description: While testing the microcks import --watch command, I noticed that file changes are only detected on the first save when editing specs in editors like VS Code or IntelliJ. After the initial save, subsequent saves are ignored and the watcher no longer triggers imports.
Expected Behavior : The watcher should continue monitoring the file and trigger imports on every save.
Actual behavior : The watch appears to be lost after the first save, so later modifications are ignored silently.
Possible cause: It looks related to how some editors perform atomic saves by writing to a temporary file and renaming it over the original file. In that case, fsnotify emits Rename/Remove events instead of only Write, and the existing watch may get dropped without being re-registered.