Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
# `**` covers nested monorepo layouts (e.g. packages/foo/node_modules/.bin).
!crates/vt_plan/tests/plan_snapshots/fixtures/*/**/node_modules
!crates/vt_bin/tests/e2e_snapshots/fixtures/nitro_build_cache/**/node_modules
!crates/vt_bin/tests/e2e_snapshots/fixtures/run_plan_json/**/node_modules
dist
.claude/settings.local.json
*.tsbuildinfo
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Changelog

- **Added** `vp run --dry-run --json` prints what a run would do as one JSON document for scripts, CI and coding agents: each task the run would run, the tasks it waits for, and each step's program, arguments and directory, with whether it would hit the cache and, if not, every change found. Like `vp run --json`, it's indented in a terminal and on one line when captured, and its `$schema` field points to a JSON Schema that describes each field. `--json` with a task requires `--dry-run`. Tasks that run `vp run` aren't supported yet and fail with an error ([#966](https://github.com/voidzero-dev/vite-task/pull/966)).
- **Changed** A cache miss now lists every change to the command, the task's cache settings and the envs it depends on, instead of the first: when a task's `input` and `output` settings changed together, or a tracked env var and a file changed together, `vp run --verbose` and `vp run --last-details` show each change on its own line. Without `-v`, files are checked only up to the first changed one; with `-v`, every input of a miss is checked, and every changed file is listed in path order. When the command, a setting or a `cache.env` var changed, only those changes are listed, since there's no cached run with the new ones to compare files with. A summary saved by an earlier version can't be shown by `vp run --last-details` ([#961](https://github.com/voidzero-dev/vite-task/pull/961), [#963](https://github.com/voidzero-dev/vite-task/pull/963)).
- **Added** `vp run --dry-run` shows what a run would do without running anything: each command's line with its cache status, and the summary, as a real run prints them. The cache is checked as in a real run, the remote cache included, and nothing is written: no cache entry, no downloaded or restored outputs, and no change to what `vp run --last-details` shows. With `-v`, the detailed summary shows why each command would miss. Like other `vp run` flags, `--dry-run` goes before the task name; after it, it's passed to the task ([#960](https://github.com/voidzero-dev/vite-task/pull/960)).
- **Fixed** `vp run` now exits with code 1 when a task's cache can't be checked, for example because the cache database can't be read. It already stopped there, but exited 0 ([#960](https://github.com/voidzero-dev/vite-task/pull/960)).
Expand Down
4 changes: 3 additions & 1 deletion crates/vt/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ fn main() {
println!("cargo::rustc-check-cfg=cfg(fspy)");
println!("cargo::rerun-if-changed=build.rs");

// The JSON Schema that `vp run --json` output points to, embedded with `artifact!`.
// The JSON Schemas that `vp run --json` and `vp run --dry-run --json` output point to,
// embedded with `artifact!`.
let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap();
println!("cargo::rustc-env=VT_TASK_GRAPH_SCHEMA={manifest_dir}/schemas/task-graph.json");
println!("cargo::rustc-env=VT_RUN_PLAN_SCHEMA={manifest_dir}/schemas/run-plan.json");

let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
if matches!(target_os.as_str(), "windows" | "macos" | "linux") {
Expand Down
Loading
Loading