fs: Replace MacWatcher with notify::FsEventWatcher#47322
Merged
Anthony-Eid merged 3 commits intozed-industries:mainfrom Jan 27, 2026
Merged
fs: Replace MacWatcher with notify::FsEventWatcher#47322Anthony-Eid merged 3 commits intozed-industries:mainfrom
Anthony-Eid merged 3 commits intozed-industries:mainfrom
Conversation
Contributor
Author
dae7c66 to
4833c3e
Compare
Contributor
|
Hoping to review this soon because the file description problem is something we want to fix! Thank you for making progress on this |
Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
4833c3e to
2e15844
Compare
Anthony-Eid
added a commit
to zed-industries/notify
that referenced
this pull request
Jan 27, 2026
This flag causes the stream to emit events when the watched root directory itself is renamed, deleted, or moved. This matches the behavior of the previous custom fsevent crate used by Zed. This is needed because we're replacing our MacWatcher with notify: zed-industries/zed#47322
Anthony-Eid
added a commit
that referenced
this pull request
Jan 27, 2026
This is in preparation of merging #47322, because our MacWatcher implementation was able to watch root directories, and I wanted to maintain that behavior to decrease the chance of any bugs occurring from a merge
Contributor
|
Once #47782 get's merged this PR will be ready to merge as well! |
Contributor
Author
|
Thank you a lot @Anthony-Eid |
Anthony-Eid
added a commit
that referenced
this pull request
Jan 27, 2026
…47782) This is in preparation of merging #47322, because our MacWatcher implementation was able to watch root directories, and I wanted to maintain that behavior to decrease the chance of any bugs occurring from a merge Note: Release candidate 9 for Notify was created two days ago which means that a new version is coming out soon. We should update to v9 once it's released to include bug fixes from upstream. Release Notes: - N/A
Anthony-Eid
added a commit
that referenced
this pull request
Jan 27, 2026
This reverts commit b1f9ca9.
Contributor
|
@marcocondrache I'm reverting this so I can remerge it tomorrow after releases, thank you for the PR |
Anthony-Eid
added a commit
that referenced
this pull request
Jan 27, 2026
Reverts #47322. I'm going to remerge this tomorrow after releases so we get a full week in nightly to catch any bugs
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.


Closes #47064
Closes #20806
The previous implementation used Zed's custom fsevent crate, which spawned a dedicated thread for each watched path. On large projects, this could result in 100+ threads just for filesystem watching.
This PR removes the
fseventcrate and switches to usingnotify'sFsEventWatcher directly. The notify implementation maintains a single FSEvents stream that watches all paths on one thread. When paths are added or removed, the stream is stopped, the path list is updated, and the stream is restarted.Ref: https://github.com/notify-rs/notify/blob/main/notify/src/fsevent.rs
As a result, Zed now uses one thread for filesystem watching regardless of how many paths are watched.
Release Notes: