v0.22.0—Bounded nullability checks and practical .NET migration guidance.See what's new

watch

Incrementally recompile Calor sources when files or effect manifests change

Bash
calor watch <files-or-directories...> [options]

Directories are scanned recursively for .calr files. bin, obj, and reference directories are excluded. New, deleted, and renamed files are re-enumerated on every rebuild, and effect-manifest changes invalidate the cache.

Bash
calor watch src/
calor watch a.calr b.calr --verbose
calor watch src/ --format json
OptionDescription
--format, -ftext or NDJSON json
--debounce-msQuiet period before rebuilding; default 200 ms
--no-cacheRecompile all files on every change
--clear-cacheRemove build state before the initial compile
--verbose, -vShow compiled and cache-hit files
--strict-apiRequire breaking-change markers for public API changes
--require-docsRequire documentation on public functions and types
--no-enforce-effectsOpt out of default-on effect enforcement
--strict-effectsPromote the "I cannot tell" effect warnings — Calor0411, Calor0419, Calor0425 — to errors
--permissive-effectsAssume a call the compiler cannot look up does nothing: Calor0411 and Calor0425 go unreported and Calor0410 becomes a warning (details)
--contract-modeoff, debug, or release

The cache validates source bytes, generated-output hashes, compiler options, and effect summaries. Diagnostic-bearing files are not cached, so their messages reappear. Since 0.16, a file whose generated C# could not be checked because a different file failed is not cached either, and no .g.cs is written for it — see When One File Fails. Watch is compile-only; it has no --run mode.

JSON mode emits one schema 2.0 envelope per line, including clean and failed rebuilds. See Structured Output.