Repository navigation
Conversation
`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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This brings the v0.40.0 changes from
developtomain. Each change was tested and merged intodevelopwith its own pull request.edc watch fsfeat(watch): use FSEvents for watch fs on macOStoo many open files. The watch starts without a tree walk.watch fsscans 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 fsfix(watch): show a notice while watch fs adds watches--recursive, a terminal shows a notice while the watches are added. macOS skips it, because FSEvents starts without a walk.