--watch (design notes §12): polls the modification times and sizes of the files under
paths, test_paths and config/ every 500 ms (no file-system dependency), waits until
a change has been still for 300 ms, then asks the server for an inner-lane run of what
changed (mix juggernaut --lane inner: the clauses changed since base, uncommitted
work included).
snapshot/2 and changes/2 are pure over the file system's answers; loop/2 drives
them until interrupted (or, for tests, :runs runs).
Summary
Types
Path to {mtime, size}.
Functions
The files added, changed or removed between two snapshots, sorted.
The directories a watch covers for config.
Watches root: on each settled change calls on_change with the changed files.
Options: :dirs (required), :runs (stop after this many, default never),
:poll_ms (500), :debounce_ms (300), :notify (called with the snapshot once
watching has begun, for tests). Returns :ok after :runs changes.
The files under dirs (relative to root, missing ones skipped) and their stamps.
Types
@type snapshot() :: %{required(String.t()) => {integer(), non_neg_integer()}}
Path to {mtime, size}.
Functions
The files added, changed or removed between two snapshots, sorted.
The directories a watch covers for config.
Watches root: on each settled change calls on_change with the changed files.
Options: :dirs (required), :runs (stop after this many, default never),
:poll_ms (500), :debounce_ms (300), :notify (called with the snapshot once
watching has begun, for tests). Returns :ok after :runs changes.
The files under dirs (relative to root, missing ones skipped) and their stamps.