Skip to content
vxvx
GitHubBlueskydev.toRSS
Releases

Init fits real workspaces, watch hears every edit

vx init writes configs that run on real Nx, pnpm and Next.js workspaces. vx watch hears every edit made during its first run, the cache keeps only bytes its key names, and distributed task execution plans with one engine.

vx 0.0.658: Init fits real workspaces, watch hears every edit

vx init was run on more than twenty well-known open source workspaces. Each gap it hit is fixed, so the configs it writes now lock and run there.

vx watch hears an edit made while its first run is going. The cache refuses bytes its key does not name.

Distributed task execution plans with one engine. This release has breaking changes: read Breaking changes first.

In this release

A config vx init writes must run on the first try. On real workspaces some did not: a name pnpm could not link, an output outside the project, a formatter the workspace does not use.

Each workspace below found a gap, and each is fixed:

  • Nx: analog, ngxtension, typebot. An Nx project name with a slash becomes a valid package name, outputs outside a project land as workspace outputs, and init names every tsconfig its written config would break.
  • pnpm: create-t3-turbo, pnpm itself, a workspace with no lockfile yet. Init installs with pnpm, and runs pnpm install after its own pnpm add.
  • Builds: documenso, trigger.dev, mastra, react-email. A cold Next.js build is saved, a tshy build stays cached across its manifest rewrite, and two tasks sharing dist keep the right one cached.
  • Formatters: init formats and ignores files only with the formatter the workspace declares.

See Migrate.

vx watch has no watcher during its first run. An edit made then could be taken for the run’s own write, or missed when committed or stashed.

The output stayed built from the old bytes until the next save.

The first run records git’s index and every task’s key. When the watcher arms, a moved key starts a cycle.

Here src/a.txt is edited one second into a two-second first build, and the cycle builds it:

Terminal window
$ vx watch build --all
Tasks status cache ±usual time cpu mem outputs blocks worker task
success miss −1ms 2.01s 0% 3.6MB 10B 0 local packages/app#build
watching 1 project · 1 task
changed packages/app#build inputs, edited during the first run
Tasks status cache ±usual time cpu mem outputs blocks worker task
success miss −6ms 2.01s 0% 3.6MB 10B 0 local packages/app#build

A task that rewrites its own input in place (sort -o, sed -i) ran about nine cycles a second, forever. Watch now settles on that rewrite and says once why:

Terminal window
vx watch: packages/app/src/list.txt is rewritten in place by its own task every run, so its rewrite starts no cycle. Set inputs.stability: { strategy: 'mutable' } to cache that task.

See Running tasks.

A stale hit replays wrong bytes under a green run, so the cache now refuses to save what its key does not describe:

  • The vx version is in every key. A release that runs one command differently can no longer restore what an older vx saved. Each task misses once after an upgrade, and vx why names vx-version.
  • An output that moved during the save (swapped for a link) is refused, not stored as its target’s bytes.
  • A dependency’s committed output that moved while its dependant ran (a checkout, a stash) withholds the dependant’s save.

When a cached task’s clean deletes files a task before it wrote, vx now says which and who wrote them:

Terminal window
$ vx run build --all
Tasks status cache ±usual time cpu mem outputs blocks worker task
success no-cache +2ms 9ms 33% — — 1 local packages/lib#types
Warnings
[vx] packages/lib#build: its outputs' clean before it ran deleted dist/index.d.ts, which packages/lib#types wrote earlier in this run — declare it in packages/lib#types's outputs, or have packages/lib#types write outside packages/lib#build's outputs
Tasks status cache ±usual time cpu mem outputs blocks worker task

The local store now keeps an entry past 2 GiB (a Next.js standalone build), and an absolute link into the workspace is cached as relative.

See Caching.

Distributed task execution plans with one engine

Section titled “Distributed task execution plans with one engine”

With @vzn/vx-dte, one forecast and one objective now place and size every run: the earliest end, then the least core time held, then the fewest workers.

  • A GitHub worker job is one command, vx dte worker, after checkout and install. Run vx dte init again to rewrite both workflows.
  • A worker that is late is waited on, never cancelled and asked again.
  • A task wider than every worker runs on the cores free now when that ends sooner.
  • The footer’s ideal is the best end the run’s worker limits allow; the uncapped end is the new perfect line.

See Distributed task execution.

  • On Linux, the sandbox reports refused reads with vx’s own observer, built into the binary: no strace to install, and a task spawning many processes no longer slows down under it. VX_DEBUG_STRACE=1 uses strace.
  • @vzn/vx-lockfile reads pnpm’s v13 lockfile format.
  • @vzn/vx-history sends task timings to the history server while the run goes, not only at its end.
  • yarn vx and package scripts calling vx start under Yarn 2+, Plug’n’Play included.
  • A changed .gitattributes selects every project under it with --affected.
  • A root package.json saved with a UTF-8 BOM keeps its workspaces’ ranges in the key.
  • A node_modules linked to a directory outside the workspace stays on a sandboxed task’s PATH.
  • @vzn/vx type-checks under a plugin author’s own tsconfig.
  • @vzn/vx-cache asks for a download again after a reset connection.
  • A missing-dependency refusal never offers the task itself as the fix.
  • Every cache key moves: each cached task misses once after the upgrade.
  • The index schema is v57: the local index resets once, so the run history starts empty.
  • A workspace package installed only by the root package.json no longer orders, keys or --affected-selects other projects: declare it in each project that loads it.
  • @vzn/vx ships launcher.cjs, not launcher.sh, as its bin.
  • dte({ scheduler }) is removed.
  • The worker workflow’s parent input and github()’s adopt of workers a step started are gone: run vx dte init again.
  • A DteAdapter’s cancel() gets no late argument, and kept() is no longer called.
  • @vzn/vx-cache-server names objects by hashed issuer, repository and ref: artifacts stored under the old names are not read. blobName() is async.

See Upgrading.

Terminal window
vx upgrade
Turborepo, Nx and other product names are trademarks of their owners. vx is not affiliated with or endorsed by them.