Skip to content

bug: File watcher stops triggering after first save in VS Code and other IDEs #432

@PranjaliBhardwaj

Description

@PranjaliBhardwaj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions