zed-industries/zed · error

registered

Error message

registered

What it means

Trace log emitted by the test watcher when a directory registration completes, here in case_insensitive_registration_matches_differently_cased_event. It records that a watch was registered for a path via the fake backend, allowing the test to verify that an event reported with different letter casing (case-insensitive filesystems) is matched against the folded WatchKey of the originally registered path.

Source

Thrown at crates/fs/src/fs_watcher.rs:1613

        // "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.
        watcher.dispatch(Ok(modify_event("/Repo/PROJ/file.txt")));

View on GitHub (pinned to 9d272b0363)

Solutions

  1. No action needed; the log confirms registration succeeded
  2. If the expected event never fires, ensure event paths are folded with the same case-insensitivity as registration
  3. Verify the registered path matches the directory the event originates from modulo casing
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at crates/fs/src/fs_watcher.rs:1613 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/7e5fc4120cb63f1b. Report an issue: GitHub.