Expand description
Warm state: scratch state a task runs faster with, kept between runs of
the same task and restored before it runs, but never part of a result.
A target opts in with qk:warm:
outputs: true: the task’s previous outputs, so an incremental tool such astsc --buildstarts from its last build;paths: scratch directories in the workspace;env: variables for the task, which may name{warm}, a directory qk keeps for the task outside the working tree.
A group already present on disk is left alone. Otherwise it is restored
from this worktree’s own save. portable: true also permits other
worktrees’ and remote saves. It is saved after successful runs, one record
per worktree.
qk:warm may also be an array of such objects, each restored and saved on
its own, so state that relocates can be portable beside state that cannot.
Structs§
- Kept
- Paths moved aside while a dependency that deletes them runs, and moved back, over whatever it left there, when this is dropped.
- Restored
- What a restore brought back.
- Warm
- A target’s
qk:warm. - Warm
Report - What warm state did for one run of a task.
Enums§
- KeyPart
- One part of a warm key.
Constants§
- FIELDS
- The fields a
qk:warmobject can set. Others are ignored, as Nx ignores keys it does not know, so a configuration can use fields a newer qk added;qk doctorreports them. - RESTORED_
AT - When restored files say they were written. Warm state comes from another
checkout, so it must look older than every file in this one: tools that
trust timestamps, as
tsc --builddoes, then check the sources against it instead of taking a restored build for an up-to-date one.
Functions§
- check_
overlaps - Two tasks in a run cannot keep the same scratch path, since both would write it.
- config
- The target’s
qk:warmentries, none without one. - keep_
across - Moves aside the warm paths of every task in the graph that depends on
taskand names it insurvive, so thattaskcannot delete them. - kept_
paths - The scratch paths every entry keeps.