microcks / microcks/microcks-cli

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

Open
#432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
52
Forks
68
Avg merge
6h 54m
Merged PRs (30d)
10

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Go entry point for the microcks import --watch command and inspect how filesystem events are handled, especially Rename and Remove events from atomic saves. Reproduce the issue by saving the same spec repeatedly in VS Code or IntelliJ, then verify that each save triggers an import and that watching continues afterward.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.