summaryrefslogtreecommitdiff
path: root/src/event
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-07-15 15:35:22 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-15 15:35:22 -0400
commit9ad439d16e797d04804b5d80706fd0e86041b161 (patch)
tree8081bc6224db1bd5c4cd36f451dd68cce0ea3a0f /src/event
parentf74b82450aa15b3e3e47617839c297cd1d60780e (diff)
Prevent race conditions between `cargo run` and `npx vite build` in `tools/run`.
To reproduce: * Make any change (even just `touch`) to a file in `ui`. * Run `tools/run`. There's a decent chance that the script will fail, with esoteric and variable errors: ``` failed to load config from .../pilcrow/vite.config.js_api(buil... error when starting dev server: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@sveltejs/kit' imported from .../pilcrow/vite.config.js.timestamp-1752608239248-52b6b8965ad28.mjs ``` is one such exmple. These errors are due to the `npm ci` carried out by `cargo` at build time (see `build.rs`), which deletes and re-creates `node_modules`. Vite and Svelte do not like having `node_modules` deleted out from under them. As `cargo` will rerun `build.rs` any time `ui` changes, this means that `tools/run` effectively requires a complete build _first_, before it can be run.
Diffstat (limited to 'src/event')
0 files changed, 0 insertions, 0 deletions