cobalt-ui icon indicating copy to clipboard operation
cobalt-ui copied to clipboard

Watch/dev mode doesn’t queue builds

Open drwpow opened this issue 3 months ago • 0 comments

Versions

  • @terrazzo/cli: *

Node.js version

24

OS + version

macOS 15

Description

When running in watch/dev mode (tz build --watch), if updates come in too quickly, the previous build won’t have time to finish. This means plugins will be called out-of-order, or in some scenarios the output could be incorrect.

Reproduction

N/A

Expected result

To solve this, we should have a “lock” where it’s aware of whether or not a build is in progress. And while locked, incoming requests are held onto, to execute when finished. But if multiple requests come in while locked, all are discarded except for the most recent (i.e. debounced).

Extra

drwpow avatar Sep 11 '25 16:09 drwpow