Expand description
File watcher + change classifier for the dev loop.
Wraps notify so the rest of the dev server (the builder in I4e
and the Tier 1 patcher in I4g) doesn’t have to deal with raw
filesystem events. Three things happen here:
- Recursive watch of a package root.
- Debounce raw notify events for ~200 ms — a single file save
can produce 3-5 notify events on macOS (atomic rename + chmod
- …); we coalesce them into one
Change.
- …); we coalesce them into one
- Classify the affected paths into
ChangeKindso callers can pick a rebuild strategy (Tier 2 cold rebuild forRustCode, full restart forCargoToml, etc).
Structs§
- Change
- One debounced change batch.
Enums§
- Change
Kind - What sort of change happened. The classifier picks the most disruptive category among the paths in a single debounced batch (Cargo.toml beats Rust code beats anything else).
Functions§
- spawn_
watcher - Spawn a recursive watcher rooted at each path in
roots. DebouncedChangebatches arrive ontx. The returnedRecommendedWatcherkeeps the OS watches alive — drop it to stop watching.