vxclearsatask's outputs before it runs, so one deletes the other's
fixgiveeachtaskitsownoutputpath
Rules like this are on by default. Turning one off lets vx run that
shape correctly, only slower, and never changes a cache key:
.vx/workspace.ts
import { defineWorkspace } from'@vzn/vx/config'
exportdefaultdefineWorkspace({
run: { rules: { exclusiveOutputs: false } },
})
One check has no switch. A task whose inputs match another task’s
outputs can’t know its key until that task ends. vx lock refuses it
and names the glob to exclude.
A vx.config.ts is code, and code can hang waiting on a dead server.
Each config gets 30 seconds, then vx lock fails and names it.
VX_CONFIG_WORKER_TIMEOUT changes the limit.
A synchronous loop
(while (true) {}) holds the thread the limit needs, so it hangs until
killed.
flowchart LR
C[vx.config.ts] -->|"vx lock (30 s limit, rules checked)"| L[.vx/projects.lock]
L -->|read as data| R[vx run]
A run reads the saved result as data. A config that reads the env or
calls Math.random runs once, at lock time. vx lock --check tells you
when running it again would give a different answer.
Commit a file that sits in a task’s output folder. On the next cache hit, Turborepo, Nx and Vite Task write the old copy back over it, and the run reports success.
sandbox
A sandboxed task reads what it depends on, and nothing beside it
A sandboxed task can read the outputs of the tasks it depends on, in any project, and never their sources. With hermetic: true it reads nothing of the machine you did not name.
correctness
One test suite, six task runners, the same 993 cases
993 task-runner cases, compiled from the test suites of Nx, Turborepo, Vite Task, moon, Nix and vx, run sandboxed against all six. Every result is on one page.
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.