A file changes while a task runs. Does the cache save the output anyway? We read the source of vx, Turborepo, Nx and Vite Task.
Caching
Caching
You save a file while a build runs. The output may come from bytes the
cache key does not name. Here is what each tool does after the command
exits, read from its source.
vx checks every declared input after the run, whoever wrote it. A
changed input keeps the result and saves nothing, and tasks downstream
skip their save too.
vx pays one lstat per input on a run that saves. Turborepo and Nx skip
that work. Vite Task checks what its tracer already saw. Which fits
depends on how often your inputs move during a run.
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.
993 task orchestration 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.