Skip to content

release: v0.40.0 (watch fs on FSEvents and large trees) - #203

Merged
JINWOO-J merged 7 commits into
mainfrom
develop
Oct 7, 2026
Merged

JINWOO-J merged 7 commits into
mainfrom
develop

Conversation

@JINWOO-J

@JINWOO-J JINWOO-J commented Oct 7, 2026

Copy link
Copy Markdown
Member

Summary

This brings the v0.40.0 changes from develop to main. Each change was tested and merged into develop with its own pull request.

edc watch fs

  • feat(watch): use FSEvents for watch fs on macOS #202 feat(watch): use FSEvents for watch fs on macOS
    • On macOS, one FSEvents stream watches the whole tree, so a large tree no longer stops with too many open files. The watch starts without a tree walk.
    • If macOS drops events, watch fs scans that directory again, at most 200,000 entries, and reports the differences. A line on stderr tells about each scan.
  • fix(watch): speed up the initial walk of watch fs #200 fix(watch): speed up the initial walk of watch fs
    • The walk that adds the watches is faster: about 295 s to 10.7 s until the first line on a tree with 2,518,334 entries.
  • fix(watch): show a notice while watch fs adds watches #201 fix(watch): show a notice while watch fs adds watches
    • With --recursive, a terminal shows a notice while the watches are added. macOS skips it, because FSEvents starts without a walk.

jinwoo and others added 7 commits October 7, 2026 15:37
`watch fs --recursive` prints its first line only after it walks the
tree and adds a watch to each directory. Since the default excludes,
the walk matched 11 patterns against every file and directory, and
each match allocated two maps. On a tree with 2.5 million entries,
the first line took about 5 minutes.

- Keep the matcher memo in a slice instead of two maps.
- Match a "**/<name>/**" pattern without metacharacters by comparing
  each path part with the name. All default excludes have this form.
- In the walk, stat an entry to compare it with the output file only
  if the entry has the same file type as the output or is a symbolic
  link. With terminal output, the walk no longer stats each file.

The same tree now prints its first line after about 11 seconds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141Pc2JZJ7wnxaSbE2bioGr
`watch fs --recursive` prints its first line only after it adds a
watch to each directory. On a large tree this step takes long enough
that the command looks hung.

If stderr is a terminal, print one line before the walk. It names the
root and says that the WATCH line shows when edc is ready. A pipe or
a file gets no notice, so scripts see the same output.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141Pc2JZJ7wnxaSbE2bioGr
With --json, the first output is a ready record, not a WATCH line.
The notice and the README now say that output starts when edc is
ready.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141Pc2JZJ7wnxaSbE2bioGr
fix(watch): speed up the initial walk of watch fs
fix(watch): show a notice while watch fs adds watches
feat(watch): use FSEvents for watch fs on macOS
@JINWOO-J
JINWOO-J merged commit 47e2547 into main Oct 7, 2026
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant