Skip to main content

Module scratch

Module scratch 

Source
Expand description

qk:sandbox: false runs a task unsandboxed under --sandbox. An object sandboxes it, and its scratch names directories in the workspace the task keeps nothing in between runs, such as a tool’s cache it cannot be told to keep elsewhere.

qk empties each scratch directory before the task runs, with or without --sandbox, so nothing an earlier run left there can change a result, whether or not the tool checks what it finds. The cache neither keeps nor restores them, a recording leaves them out, and the sandbox lets the task read and write them. A tool whose cache is safe to keep, as one checking every entry against what it read, is better kept as warm state.

Structs§

Settings
What a target’s qk:sandbox says.

Constants§

FIELDS
The fields a qk:sandbox object can set. Others are ignored, as Nx ignores keys it does not know; qk doctor reports them.

Functions§

check_overlaps
Two tasks in a run cannot share a scratch directory, nor have one inside another’s: emptying it before one runs would take what the other is using.
directories
A task’s scratch directories, absolute: each must lie inside the workspace, outside .git, .qk and node_modules in any case, hold no project, nor the cache or qk’s state, and neither be nor lie under a symbolic link, which emptying it could follow out of the workspace.
directories_of
directories for a qk:sandbox value of one of project’s targets.