zed-industries/zed · error
add
Error message
add
What it means
Trace log from the fs_watcher test suite recording that a watch was added for a directory. In the test watch_key_folds_unicode_normalization_on_macos this fires when the watcher registers a path like /repo/Café; on macOS the registration key is Unicode-normalization-folded (NFC vs NFD) so later events for the same directory match the watch even though the byte sequences differ.
Source
Thrown at crates/fs/src/fs_watcher.rs:1612
fn watch_key_folds_unicode_normalization_on_macos() {
// "Café" precomposed (NFC) vs decomposed (NFD) are different byte
// sequences but the same directory on a normalization-insensitive volume.
let nfc = Path::new("/repo/Caf\u{00e9}");
let nfd = Path::new("/repo/Cafe\u{0301}");
assert_ne!(nfc, nfd);
assert_eq!(
WatchKey::folded(SanitizedPath::new(nfc)),
WatchKey::folded(SanitizedPath::new(nfd)),
);
}
#[test]
fn case_insensitive_registration_matches_differently_cased_event() {
let (fired, cb) = fired_count();
let watcher = test_os_watcher(OsWatcherKind::Native, Some(Default::default()));
watcher
.add(Path::new("/Repo/Project").into(), true, cb)
.expect("add")
.expect("registered");
// Event arrives lowercased (as TSGO/macOS may report it).
watcher.dispatch(Ok(modify_event("/repo/project/file.txt")));
assert_eq!(*fired.lock(), 1);
}
#[test]
fn case_insensitive_registration_survives_case_only_rename() {
let (fired, cb) = fired_count();
let watcher = test_os_watcher(OsWatcherKind::Native, Some(Default::default()));
watcher
.add(Path::new("/Repo/Proj").into(), true, cb)
.expect("add")
.expect("registered");
// The watched directory was renamed to a different casing; events now
// arrive under the new spelling.View on GitHub (pinned to 9d272b0363)
Solutions
- No action needed; this confirms the watch was added
- If registration fails, confirm the path exists and is a directory
- On macOS rely on the normalization-folding of WatchKey rather than raw path comparison
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at crates/fs/src/fs_watcher.rs:1612 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@9d272b0363 (2026-09-12).
Data as JSON: /api/errors/0f3254e4079edc28.
Report an issue: GitHub.