diff --git a/crates/vt/src/session/cache/mod.rs b/crates/vt/src/session/cache/mod.rs index d3cd3f2bf..f0e596c02 100644 --- a/crates/vt/src/session/cache/mod.rs +++ b/crates/vt/src/session/cache/mod.rs @@ -803,7 +803,13 @@ impl ExecutionCache { let start = Instant::now(); let fetched = self .remote_clients - .fetch(remote_config, cache_key, &cache_metadata.execution_cache_key, cancel_token) + .fetch( + remote_config, + cache_metadata.platform, + cache_key, + &cache_metadata.execution_cache_key, + cancel_token, + ) .await; let (outcome, entries) = match &fetched { Ok(Some(Fetched::Exact { entries })) => ("exact", entries.len()), @@ -820,9 +826,11 @@ impl ExecutionCache { ); let (cache_key, validation, dir) = (cache_key.clone(), validation.clone(), self.dir.clone()); + let platform = cache_metadata.platform; let check = move || { remote::resolve( fetched, + platform, &cache_key, |cache_value| validation.validate(cache_value), |cache_value| { @@ -1008,6 +1016,7 @@ impl ExecutionCache { }; match self.remote_clients.prepare_upload( remote_config, + cache_metadata.platform, &cache_key, execution_cache_key, &cache_value, diff --git a/crates/vt/src/session/cache/remote.rs b/crates/vt/src/session/cache/remote.rs index 44c933b86..c43305022 100644 --- a/crates/vt/src/session/cache/remote.rs +++ b/crates/vt/src/session/cache/remote.rs @@ -11,7 +11,12 @@ //! //! Both keys start with a header containing the cache schema version, the //! remote value format, and the target OS and architecture. Platforms share an -//! endpoint's namespace, but their keys differ. +//! endpoint's namespace, but their keys differ. A part of the platform that the +//! task's `cache.platform` doesn't list is empty in the header, so platforms +//! that differ only in that part share the task's entries if the rest of their +//! keys match. The rest names the resolved program, such as `node.exe` on +//! Windows and `node` elsewhere, so Windows entries don't match other +//! platforms' entries. use std::{ fs::File, @@ -25,6 +30,7 @@ use rustc_hash::FxHashMap; use tokio::sync::mpsc; use tokio_util::{sync::CancellationToken, task::TaskTracker}; use tracing::Instrument as _; +use vt_graph::config::CachePlatform; use vt_path::AbsolutePath; use vt_plan::{ cache_metadata::ExecutionCacheKey, @@ -126,10 +132,12 @@ pub(super) struct Restore { /// `describe` describes it for `vp run -vv`. If no entry passes, the miss is /// the newest entry's: the changes it found, or a read failure if it doesn't /// decode, its blob doesn't match its value, or it can't be validated. A -/// fallback's miss reason compares its key with `cache_key`, and no match is -/// a miss without an entry. A failed fetch is a read failure. +/// fallback's miss reason compares its key, which has the header for +/// `platform`, with `cache_key`, and no match is a miss without an entry. A +/// failed fetch is a read failure. pub(super) fn resolve( fetched: Result, ReadError>, + platform: CachePlatform, cache_key: &CacheEntryKey, mut validate: impl FnMut(&CacheEntryValue) -> anyhow::Result, mut describe: impl FnMut(&CacheEntryValue) -> Option>, @@ -137,7 +145,7 @@ pub(super) fn resolve( let entries = match fetched.map_err(ReadError::into_miss)? { Some(Fetched::Exact { entries }) => entries, Some(Fetched::Fallback { key }) => { - let key = decode_key(&key).map_err(ReadError::into_miss)?; + let key = decode_key(platform, &key).map_err(ReadError::into_miss)?; return Err(CacheMiss::Changed(Comparison::of_key(&key, cache_key))); } None => return Err(CacheMiss::NotFound), @@ -221,18 +229,20 @@ impl RemoteClients { /// Fetch the entries stored under `cache_key` in the remote cache that /// `remote_config` configures, falling back to the key last stored for - /// `execution_cache_key`. Returns `None` if neither key matched. Stops - /// when `cancel_token` is cancelled. + /// `execution_cache_key`. Both keys name the parts of this machine's + /// platform that `platform` lists. Returns `None` if neither key matched. + /// Stops when `cancel_token` is cancelled. pub(super) async fn fetch( &self, remote_config: &ResolvedRemoteCacheConfig, + platform: CachePlatform, cache_key: &CacheEntryKey, execution_cache_key: &ExecutionCacheKey, cancel_token: &CancellationToken, ) -> Result, ReadError> { let client = self.client(remote_config).map_err(ReadError::Fetch)?; - let key = encode_key(cache_key)?; - let secondary_key = encode_key(execution_cache_key)?; + let key = encode_key(platform, cache_key)?; + let secondary_key = encode_key(platform, execution_cache_key)?; cancel_token .run_until_cancelled(client.fetch(&key, &secondary_key)) .await @@ -277,13 +287,15 @@ impl RemoteClients { /// Prepare to upload an entry that was just recorded locally, along with /// its output archive in `cache_dir`, to the remote cache that - /// `remote_config` configures: get its client and encode the entry. - /// Nothing is sent until the returned future is polled, so an invalid - /// endpoint or an entry that doesn't encode fails here. The future owns - /// everything the upload needs, so it can run in a spawned task. + /// `remote_config` configures: get its client and encode the entry, with + /// keys for `platform`. Nothing is sent until the returned future is + /// polled, so an invalid endpoint or an entry that doesn't encode fails + /// here. The future owns everything the upload needs, so it can run in a + /// spawned task. pub(super) fn prepare_upload( &self, remote_config: &ResolvedRemoteCacheConfig, + platform: CachePlatform, cache_key: &CacheEntryKey, execution_cache_key: &ExecutionCacheKey, cache_value: &CacheEntryValue, @@ -291,8 +303,8 @@ impl RemoteClients { ) -> Result> + Send + use<>, UploadError> { let start = Instant::now(); let client = self.client(remote_config)?; - let key = encode_key(cache_key)?; - let secondary_key = encode_key(execution_cache_key)?; + let key = encode_key(platform, cache_key)?; + let secondary_key = encode_key(platform, execution_cache_key)?; let value = encode_value(cache_value)?; let archive = cache_value.output_archive.as_ref().map(|name| cache_dir.join(name.as_str())); tracing::debug!( @@ -528,26 +540,31 @@ struct KeyHeader { arch: Str, } -/// The key header for this build. -fn encode_header() -> WriteResult> { +/// The key header for this build. It names the parts of this build's target +/// that `platform` lists, and the other parts are empty. No target has an +/// empty OS or architecture, so a key without a part never equals a key with it. +fn encode_header(platform: CachePlatform) -> WriteResult> { serialize_cache(&KeyHeader { cache_schema_version: CACHE_SCHEMA_VERSION, remote_value_format: REMOTE_VALUE_FORMAT, - os: Str::from(std::env::consts::OS), - arch: Str::from(std::env::consts::ARCH), + os: Str::from(if platform.os { std::env::consts::OS } else { "" }), + arch: Str::from(if platform.arch { std::env::consts::ARCH } else { "" }), }) } -/// Encode a key with the header for this build. -fn encode_key>(key: &K) -> WriteResult> { - let mut bytes = encode_header()?; +/// Encode a key with the header for this build and `platform`. +fn encode_key>( + platform: CachePlatform, + key: &K, +) -> WriteResult> { + let mut bytes = encode_header(platform)?; bytes.extend(serialize_cache(key)?); Ok(bytes) } -/// Decode a key stored with the header for this build. -fn decode_key(bytes: &[u8]) -> Result { - let header = encode_header()?; +/// Decode a key stored with the header for this build and `platform`. +fn decode_key(platform: CachePlatform, bytes: &[u8]) -> Result { + let header = encode_header(platform)?; let key = bytes.strip_prefix(header.as_slice()).ok_or(ReadError::CorruptKey(None))?; deserialize_cache(key).map_err(|err| ReadError::CorruptKey(Some(err))) } @@ -691,7 +708,7 @@ mod tests { fn corrupt_value(value: Vec) -> Arc { let key = cache_key(ResolvedGlobConfig::default_auto()); let fetched = Ok(Some(Fetched::Exact { entries: vec![Entry { value, blob_id: None }] })); - match resolve(fetched, &key, not_validated, no_baseline).unwrap_err() { + match resolve(fetched, CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err() { CacheMiss::RemoteReadFailed(error) => { assert_eq!(vt_str::format!("{error}"), "remote cache value is corrupt"); error @@ -705,6 +722,7 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let restore = resolve( Ok(Some(exact(&cache_value()))), + CachePlatform::ALL, &key, validate_against(BTreeMap::new()), no_baseline, @@ -720,6 +738,7 @@ mod tests { let current_inputs = BTreeMap::from([(RelativePathBuf::new("src/a.txt").unwrap(), 1)]); let miss = resolve( Ok(Some(exact(&cache_value()))), + CachePlatform::ALL, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(current_inputs), no_baseline, @@ -741,6 +760,7 @@ mod tests { let entries = vec![entry(&cache_value(), "2"), entry(&cache_value(), "1")]; let restore = resolve( Ok(Some(Fetched::Exact { entries })), + CachePlatform::ALL, &key, validate_against(BTreeMap::new()), no_baseline, @@ -762,6 +782,7 @@ mod tests { let mut validate = validate_against(inputs(&["src/a.txt"])); let restore = resolve( Ok(Some(Fetched::Exact { entries })), + CachePlatform::ALL, &key, |value| { validated += 1; @@ -782,6 +803,7 @@ mod tests { let entries = vec![entry(&cache_value(), "2"), entry(&with_inputs(&["src/b.txt"]), "1")]; let miss = resolve( Ok(Some(Fetched::Exact { entries })), + CachePlatform::ALL, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -795,6 +817,7 @@ mod tests { ]; let miss = resolve( Ok(Some(Fetched::Exact { entries })), + CachePlatform::ALL, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -813,6 +836,7 @@ mod tests { .insert(TrackedEnvQuery::Glob(Str::from("PROBE_[")), BTreeMap::new()); let miss = resolve( Ok(Some(exact(&value))), + CachePlatform::ALL, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(BTreeMap::new()), no_baseline, @@ -823,11 +847,13 @@ mod tests { #[test] fn fallback_is_a_mismatch_with_the_stored_key() { - let stored_key = encode_key(&cache_key(ResolvedGlobConfig::default_auto())).unwrap(); + let stored_key = + encode_key(CachePlatform::ALL, &cache_key(ResolvedGlobConfig::default_auto())).unwrap(); let mut input_config = ResolvedGlobConfig::default_auto(); input_config.positive_globs.insert(Str::from("src/**")); let miss = resolve( Ok(Some(Fetched::Fallback { key: stored_key })), + CachePlatform::ALL, &cache_key(input_config), not_validated, no_baseline, @@ -849,7 +875,8 @@ mod tests { #[test] fn no_match_is_a_miss_without_an_entry() { let key = cache_key(ResolvedGlobConfig::default_auto()); - let miss = resolve(Ok(None), &key, not_validated, no_baseline).unwrap_err(); + let miss = + resolve(Ok(None), CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert!(matches!(miss, CacheMiss::NotFound), "{miss:?}"); } @@ -857,7 +884,8 @@ mod tests { fn failed_fetch_is_a_read_failure() { let key = cache_key(ResolvedGlobConfig::default_auto()); let fetched = Err(ReadError::Fetch(vt_remote_cache::Error::InvalidEndpoint(None))); - let miss = resolve(fetched, &key, not_validated, no_baseline).unwrap_err(); + let miss = + resolve(fetched, CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert_eq!(read_failure(miss), "remote cache fetch failed"); } @@ -924,7 +952,8 @@ mod tests { for (value, blob_id) in [(cache_value(), None), (without_archive, Some(Str::from("1")))] { let value = encode_value(&value).unwrap(); let fetched = Ok(Some(Fetched::Exact { entries: vec![Entry { value, blob_id }] })); - let miss = resolve(fetched, &key, not_validated, no_baseline).unwrap_err(); + let miss = + resolve(fetched, CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert_eq!(read_failure(miss), "remote cache entry's blob doesn't match its value"); } } @@ -945,15 +974,75 @@ mod tests { }; let other_schema = other_header(CACHE_SCHEMA_VERSION + 1, REMOTE_VALUE_FORMAT); let other_format = other_header(CACHE_SCHEMA_VERSION, REMOTE_VALUE_FORMAT + 1); - let mut garbage = encode_header().unwrap(); + let mut garbage = encode_header(CachePlatform::ALL).unwrap(); garbage.extend(b"not a cache key"); for stored_key in [b"not a cache key".to_vec(), other_schema, other_format, garbage] { let fetched = Ok(Some(Fetched::Fallback { key: stored_key })); - let miss = resolve(fetched, &key, not_validated, no_baseline).unwrap_err(); + let miss = + resolve(fetched, CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert_eq!(read_failure(miss), "remote cache key is corrupt"); } } + /// A platform with no part listed, so that every platform shares the keys. + const NO_PLATFORM: CachePlatform = CachePlatform { os: false, arch: false }; + + /// The header of a key stored for `os` and `arch` by this build. + fn header_for(os: &str, arch: &str) -> Vec { + serialize_cache(&KeyHeader { + cache_schema_version: CACHE_SCHEMA_VERSION, + remote_value_format: REMOTE_VALUE_FORMAT, + os: Str::from(os), + arch: Str::from(arch), + }) + .unwrap() + } + + #[test] + fn keys_name_only_the_listed_parts_of_the_platform() { + let key = cache_key(ResolvedGlobConfig::default_auto()); + let encoded = serialize_cache(&key).unwrap(); + let (os, arch) = (std::env::consts::OS, std::env::consts::ARCH); + for (platform, header) in [ + (CachePlatform::ALL, header_for(os, arch)), + (CachePlatform { os: true, arch: false }, header_for(os, "")), + (CachePlatform { os: false, arch: true }, header_for("", arch)), + // No part is named, so every platform encodes the same key. + (NO_PLATFORM, header_for("", "")), + ] { + assert_eq!(encode_key(platform, &key).unwrap(), [header, encoded.clone()].concat()); + } + } + + #[test] + fn fallback_key_decodes_only_with_its_platform() { + let stored = cache_key(ResolvedGlobConfig::default_auto()); + let mut input_config = ResolvedGlobConfig::default_auto(); + input_config.positive_globs.insert(Str::from("src/**")); + let key = cache_key(input_config); + for (stored_platform, platform, decodes) in [ + (NO_PLATFORM, NO_PLATFORM, true), + (CachePlatform::ALL, NO_PLATFORM, false), + (NO_PLATFORM, CachePlatform::ALL, false), + ] { + let fetched = + Ok(Some(Fetched::Fallback { key: encode_key(stored_platform, &stored).unwrap() })); + let miss = resolve(fetched, platform, &key, not_validated, no_baseline).unwrap_err(); + if decodes { + assert!( + matches!( + &miss, + CacheMiss::Changed(comparison) + if comparison.changes == [Change::InputConfig] + ), + "{miss:?}" + ); + } else { + assert_eq!(read_failure(miss), "remote cache key is corrupt"); + } + } + } + /// A `read-write` remote cache at `url` without credentials. fn anonymous(url: &str) -> ResolvedRemoteCacheConfig { ResolvedRemoteCacheConfig { @@ -1015,7 +1104,8 @@ mod tests { let execution_key = ExecutionCacheKey::ExecAPI(Arc::from([])); let clients = RemoteClients::default(); - let fetch = clients.fetch(&remote_config, &key, &execution_key, &cancel_token); + let fetch = + clients.fetch(&remote_config, CachePlatform::ALL, &key, &execution_key, &cancel_token); let (fetched, ()) = tokio::join!(fetch, async { requested.await.unwrap(); cancel_token.cancel(); @@ -1058,7 +1148,14 @@ mod tests { let execution_key = ExecutionCacheKey::ExecAPI(Arc::from([])); let value = CacheEntryValue { output_archive: None, ..cache_value() }; let cache_dir = vt_path::current_dir().unwrap(); - clients.prepare_upload(remote_config, &key, &execution_key, &value, &cache_dir) + clients.prepare_upload( + remote_config, + CachePlatform::ALL, + &key, + &execution_key, + &value, + &cache_dir, + ) } fn upload_error(error: &OnceLock) -> Option { diff --git a/crates/vt_bin/src/lib.rs b/crates/vt_bin/src/lib.rs index ebe44c02a..aebb04805 100644 --- a/crates/vt_bin/src/lib.rs +++ b/crates/vt_bin/src/lib.rs @@ -100,6 +100,7 @@ impl vt::CommandHandler for CommandHandler { input: None, output: None, remote: None, + platform: None, }), envs: Arc::clone(&command.envs), })) diff --git a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml index 5f5e3f4b6..fd25d4036 100644 --- a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml +++ b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots.toml @@ -290,6 +290,91 @@ steps = [ ], ] +# `generate` sets `cache.platform: []`, so its remote keys name no OS or +# architecture. Only one platform runs here, so this case checks that its entry +# round trips and that the setting changes the remote keys but not the local +# cache. +[[e2e]] +name = "platform_independent" +cfg = 'not(target_env = "musl")' +ignore = true +steps = [ + [ + "remote-cache-server", + "start", + ], + { argv = [ + "remote-cache-server", + "run", + "--github-actions", + "vt", + "run", + "generate", + ], envs = [ + [ + "VP_REMOTE_CACHE", + "read-write", + ], + [ + "VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS", + "1", + ], + ] }, + [ + "vt", + "cache", + "clean", + ], + [ + "vtt", + "rm", + "-rf", + "dist", + ], + { argv = [ + "remote-cache-server", + "run", + "vt", + "run", + "generate", + ], comment = "The entry stored under the keys that name no platform is a remote hit." }, + { argv = [ + "vtt", + "print-file", + "dist/generated.txt", + ], comment = "The outputs are restored." }, + [ + "vtt", + "replace-file-content", + "vite-task.json", + '"platform": []', + '"platform": ["os", "arch"]', + ], + { argv = [ + "remote-cache-server", + "run", + "vt", + "run", + "generate", + ], comment = "The local cache doesn't depend on the setting, so this is a local hit with no requests." }, + [ + "vt", + "cache", + "clean", + ], + { argv = [ + "remote-cache-server", + "run", + "vt", + "run", + "generate", + ], comment = "The remote keys name this platform now, so neither matches the stored entry's keys." }, + [ + "remote-cache-server", + "stop", + ], +] + [[e2e]] name = "corrupt_archive" cfg = 'not(target_env = "musl")' diff --git a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md new file mode 100644 index 000000000..5ad7c737f --- /dev/null +++ b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md @@ -0,0 +1,82 @@ +# platform_independent + +## `remote-cache-server start` + +``` +``` + +## `VP_REMOTE_CACHE=read-write VP_RUN_INTERNAL_HIDE_PENDING_UPLOADS=1 remote-cache-server run --github-actions vt run generate` + +``` +$ vtt write-file dist/generated.txt generated + +[remote-cache] POST /fetch 404 +[remote-cache] POST /store 200 +``` + +## `vt cache clean` + +``` +``` + +## `vtt rm -rf dist` + +``` +``` + +## `remote-cache-server run vt run generate` + +The entry stored under the keys that name no platform is a remote hit. + +``` +$ vtt write-file dist/generated.txt generated ◉ remote cache hit, replaying + +--- +vt run: remote cache hit. +[remote-cache] POST /fetch 200 exact [1] +[remote-cache] GET /blob/1 200 +``` + +## `vtt print-file dist/generated.txt` + +The outputs are restored. + +``` +generated +``` + +## `vtt replace-file-content vite-task.json '"platform": []' '"platform": ["os", "arch"]'` + +``` +``` + +## `remote-cache-server run vt run generate` + +The local cache doesn't depend on the setting, so this is a local hit with no requests. + +``` +$ vtt write-file dist/generated.txt generated ◉ cache hit, replaying + +--- +vt run: cache hit. +``` + +## `vt cache clean` + +``` +``` + +## `remote-cache-server run vt run generate` + +The remote keys name this platform now, so neither matches the stored entry's keys. + +``` +$ vtt write-file dist/generated.txt generated + +[remote-cache] POST /fetch 404 +``` + +## `remote-cache-server stop` + +``` +``` diff --git a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/vite-task.json b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/vite-task.json index 893757ae0..c0f028ee2 100644 --- a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/vite-task.json +++ b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/vite-task.json @@ -30,6 +30,14 @@ "command": "vtt exit 1", "dependsOn": ["build"], "cache": false + }, + "generate": { + "command": "vtt write-file dist/generated.txt generated", + "cache": { + "input": ["src/**"], + "output": ["dist/**"], + "platform": [] + } } } } diff --git a/crates/vt_graph/src/config/mod.rs b/crates/vt_graph/src/config/mod.rs index 3f2eecff3..10c0cb5c3 100644 --- a/crates/vt_graph/src/config/mod.rs +++ b/crates/vt_graph/src/config/mod.rs @@ -6,9 +6,9 @@ use hashbrown::hash_map::EntryRef; use rustc_hash::{FxBuildHasher, FxHashSet}; use serde::Serialize; pub use user::{ - AutoTracking, Command, EnabledCacheConfig, GlobWithBase, InputBase, ResolvedGlobalCacheConfig, - UserCacheConfig, UserDependencyType, UserDependsOnEntry, UserDependsOnFrom, - UserGlobalCacheConfig, UserInputEntry, UserInputsConfig, UserOutputEntry, + AutoTracking, Command, EnabledCacheConfig, GlobWithBase, InputBase, PlatformDimension, + ResolvedGlobalCacheConfig, UserCacheConfig, UserDependencyType, UserDependsOnEntry, + UserDependsOnFrom, UserGlobalCacheConfig, UserInputEntry, UserInputsConfig, UserOutputEntry, UserPackageDependency, UserRunConfig, UserTaskConfig, UserTaskDefinition, }; use vt_path::AbsolutePath; @@ -87,6 +87,10 @@ impl ResolvedTaskOptions { Some(CacheConfig { remote_cache_allowed: enabled_cache_config.remote.unwrap_or(true), + platform: enabled_cache_config + .platform + .as_deref() + .map(CachePlatform::from_dimensions), env_config: EnvConfig { fingerprinted_envs: enabled_cache_config .env @@ -108,11 +112,44 @@ pub struct CacheConfig { /// Whether the task's `cache.remote` allows remote caching. An execution uses /// the remote cache only if its `vp run` level also resolves one. pub remote_cache_allowed: bool, + /// The task's `cache.platform`, or `None` if it doesn't set one. Planning + /// replaces `None` with the workspace's `cache.platform`. + pub platform: Option, pub env_config: EnvConfig, pub input_config: ResolvedGlobConfig, pub output_config: ResolvedGlobConfig, } +/// The parts of the platform that a task's cache entries depend on. Remote +/// cache entries are shared only between machines whose listed parts match. +#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)] +pub struct CachePlatform { + /// Whether the entries depend on the operating system. + pub os: bool, + /// Whether the entries depend on the CPU architecture. + pub arch: bool, +} + +impl CachePlatform { + /// Every part of the platform: the default. + pub const ALL: Self = Self { os: true, arch: true }; + + /// The parts that `dimensions` lists. + #[must_use] + pub fn from_dimensions(dimensions: &[PlatformDimension]) -> Self { + Self { + os: dimensions.contains(&PlatformDimension::Os), + arch: dimensions.contains(&PlatformDimension::Arch), + } + } + + /// The parts that either `self` or `other` lists. + #[must_use] + pub const fn union(self, other: Self) -> Self { + Self { os: self.os || other.os, arch: self.arch || other.arch } + } +} + /// Resolved input configuration for cache fingerprinting. /// /// This is the normalized form after parsing user config. diff --git a/crates/vt_graph/src/config/user.rs b/crates/vt_graph/src/config/user.rs index 92f00a2ef..bfde8bb8f 100644 --- a/crates/vt_graph/src/config/user.rs +++ b/crates/vt_graph/src/config/user.rs @@ -11,6 +11,8 @@ use vec1::Vec1; use vt_path::RelativePathBuf; use vt_str::Str; +use super::CachePlatform; + mod top_level_cache_fields; pub(crate) use top_level_cache_fields::TopLevelCacheFieldsCollector; @@ -254,6 +256,43 @@ pub struct EnabledCacheConfig { // Parsed but left out of the public types while remote caching is unreleased. #[cfg_attr(all(test, not(clippy)), ts(skip))] pub remote: Option, + + /// The parts of the platform that this task's outputs depend on. Defaults to the + /// workspace root's `cache.platform`, which defaults to `["os", "arch"]`. + /// + /// - `"os"`: the operating system, such as `linux` or `macos` + /// - `"arch"`: the CPU architecture, such as `x86_64` or `aarch64` + /// - `[]`: neither, for a task whose outputs are the same on every platform, such as a + /// code generator that runs on Node.js + /// + /// Remote cache entries are shared only between machines whose listed parts match, so + /// with `[]` an entry stored on Linux CI can be restored on macOS. A fetched entry is + /// still checked against this machine's inputs, and the rest of the key, such as the + /// command, its arguments, and its working directory, must still match. If the outputs + /// depend on a part that isn't listed, in a way that the cache doesn't track, such as a + /// check of `process.platform`, another platform's outputs are restored. + /// + /// The key names the program that the command resolves to, not the command as written. + /// A program outside the workspace is named by its file name, and a program inside it by + /// its path in the workspace. Windows resolves `node` to `node.exe` and a + /// `node_modules/.bin` program to its `.cmd` shim, so Windows entries don't match Linux + /// or macOS entries. + /// + /// The local cache is the same whatever this lists. Changing it changes the task's + /// remote keys, so the task misses the remote cache once. + // Parsed but left out of the public types while remote caching is unreleased. + #[cfg_attr(all(test, not(clippy)), ts(skip))] + pub platform: Option>, +} + +/// A part of the platform that a task's outputs can depend on. +#[derive(Debug, Clone, Copy, Deserialize, PartialEq, Eq)] +#[serde(rename_all = "lowercase")] +pub enum PlatformDimension { + /// The operating system. + Os, + /// The CPU architecture. + Arch, } /// Options for user-defined tasks in `vite.config.*`, excluding the command. @@ -397,6 +436,14 @@ pub enum UserGlobalCacheConfig { // Parsed but left out of the public types while remote caching is unreleased. #[cfg_attr(all(test, not(clippy)), ts(skip))] remote: Option, + + /// The parts of the platform that task outputs depend on, for every task and cached + /// script that doesn't set its own `cache.platform`. See the task's `cache.platform`. + /// + /// Default: `["os", "arch"]` + // Parsed but left out of the public types while remote caching is unreleased. + #[cfg_attr(all(test, not(clippy)), ts(skip))] + platform: Option>, }, } @@ -408,26 +455,34 @@ pub struct ResolvedGlobalCacheConfig { /// Remote cache endpoint from `cache.remote.url`, if configured. Planning /// uses `VP_REMOTE_CACHE_URL` instead when it's set. pub remote_url: Option>, + /// The workspace's `cache.platform`, for tasks that don't set their own. + pub platform: CachePlatform, } impl ResolvedGlobalCacheConfig { /// Resolve from an optional user config, using defaults when `None`. /// - /// Default: `{ scripts: false, tasks: true }` + /// Default: `{ scripts: false, tasks: true, platform: ["os", "arch"] }` #[must_use] pub fn resolve_from(config: Option<&UserGlobalCacheConfig>) -> Self { + let default_platform = CachePlatform::ALL; match config { - None => Self { scripts: false, tasks: true, remote_url: None }, + None => { + Self { scripts: false, tasks: true, remote_url: None, platform: default_platform } + } Some(UserGlobalCacheConfig::Bool(true)) => { - Self { scripts: true, tasks: true, remote_url: None } + Self { scripts: true, tasks: true, remote_url: None, platform: default_platform } } Some(UserGlobalCacheConfig::Bool(false)) => { - Self { scripts: false, tasks: false, remote_url: None } + Self { scripts: false, tasks: false, remote_url: None, platform: default_platform } } - Some(UserGlobalCacheConfig::Detailed { scripts, tasks, remote }) => Self { + Some(UserGlobalCacheConfig::Detailed { scripts, tasks, remote, platform }) => Self { scripts: scripts.unwrap_or(false), tasks: tasks.unwrap_or(true), remote_url: remote.as_ref().map(|remote| Arc::clone(&remote.url)), + platform: platform + .as_deref() + .map_or(default_platform, CachePlatform::from_dimensions), }, } } @@ -796,6 +851,7 @@ mod tests { "input": ["src/**"], "output": ["dist/**"], "remote": false, + "platform": ["os"], }, }); let user_config: UserTaskConfig = serde_json::from_value(user_config_json.clone()).unwrap(); @@ -808,10 +864,28 @@ mod tests { input: Some(vec![UserInputEntry::Glob("src/**".into())]), output: Some(vec![UserOutputEntry::Glob("dist/**".into())]), remote: Some(false), + platform: Some(vec![PlatformDimension::Os]), }) ); } + #[test] + fn test_cache_platform() { + let cases = [ + (json!([]), CachePlatform { os: false, arch: false }), + (json!(["os"]), CachePlatform { os: true, arch: false }), + (json!(["arch"]), CachePlatform { os: false, arch: true }), + (json!(["arch", "os"]), CachePlatform::ALL), + (json!(["os", "os"]), CachePlatform { os: true, arch: false }), + ]; + for (platform, expected) in cases { + let user_config_json = + json!({ "command": "echo test", "cache": { "platform": platform } }); + let platform = task_cache_config(user_config_json).unwrap().platform.unwrap(); + assert_eq!(CachePlatform::from_dimensions(&platform), expected); + } + } + #[test] fn test_cache_object_unknown_field_error() { let user_config_json = json!({ @@ -1066,6 +1140,21 @@ mod tests { assert!(serde_json::from_value::(json!({ "remoteCache": {} })).is_err()); } + #[test] + fn test_global_cache_platform() { + for (config, expected) in [ + (json!({ "platform": [] }), CachePlatform { os: false, arch: false }), + (json!({ "platform": ["arch"] }), CachePlatform { os: false, arch: true }), + (json!({ "scripts": true }), CachePlatform::ALL), + (json!(true), CachePlatform::ALL), + (json!(false), CachePlatform::ALL), + ] { + let config: UserGlobalCacheConfig = serde_json::from_value(config).unwrap(); + assert_eq!(ResolvedGlobalCacheConfig::resolve_from(Some(&config)).platform, expected); + } + assert_eq!(ResolvedGlobalCacheConfig::resolve_from(None).platform, CachePlatform::ALL); + } + #[test] fn test_global_cache_none_defaults() { let resolved = ResolvedGlobalCacheConfig::resolve_from(None); @@ -1100,12 +1189,16 @@ mod tests { ( json!({ "command": "echo", "cache": { "outputs": [] } }), "unknown field `outputs`, expected one of `env`, `untrackedEnv`, `input`, \ - `output`, `remote`", + `output`, `remote`, `platform`", ), ( json!({ "command": "echo", "cache": "yes" }), "invalid type: string \"yes\", expected a boolean or an object of cache settings", ), + ( + json!({ "command": "echo", "cache": { "platform": ["linux"] } }), + "unknown variant `linux`, expected `os` or `arch`", + ), (json!({ "cache": false }), "missing field `command`"), (json!(["echo one", 2]), "invalid type: integer `2`, expected a string"), ( diff --git a/crates/vt_plan/src/cache_metadata.rs b/crates/vt_plan/src/cache_metadata.rs index 20e8ca05f..5895d92c9 100644 --- a/crates/vt_plan/src/cache_metadata.rs +++ b/crates/vt_plan/src/cache_metadata.rs @@ -3,7 +3,7 @@ use std::{ffi::OsStr, sync::Arc}; use rustc_hash::FxHashMap; use serde::Serialize; use vt_casefold::EnvName; -use vt_graph::config::ResolvedGlobConfig; +use vt_graph::config::{CachePlatform, ResolvedGlobConfig}; use vt_path::RelativePathBuf; use vt_str::{self, Str}; use wincode::{SchemaRead, SchemaWrite}; @@ -55,6 +55,11 @@ pub struct CacheMetadata { /// Used at execution time to determine what output files to archive. pub output_config: ResolvedGlobConfig, + /// The parts of the platform that the entries depend on: the task's + /// `cache.platform`, or the workspace's. Remote keys name only these parts + /// of this machine's platform. Local keys don't depend on it. + pub platform: CachePlatform, + /// Remote cache for this execution: the one resolved for its `vp run` level, /// unless the task sets `cache.remote: false`. `None` means local caching only. pub remote_cache: Option, diff --git a/crates/vt_plan/src/plan.rs b/crates/vt_plan/src/plan.rs index 616d830a9..afab30b31 100644 --- a/crates/vt_plan/src/plan.rs +++ b/crates/vt_plan/src/plan.rs @@ -17,7 +17,7 @@ use vt_casefold::EnvName; use vt_graph::{ TaskId, TaskNode, TaskSource, config::{ - CacheConfig, EnabledCacheConfig, GlobResolver, ResolvedGlobConfig, + CacheConfig, CachePlatform, EnabledCacheConfig, GlobResolver, ResolvedGlobConfig, ResolvedGlobalCacheConfig, ResolvedTaskOptions, user::{UserCacheConfig, UserTaskOptions}, }, @@ -66,9 +66,10 @@ fn which( /// Compute the effective cache config for a task, applying the global cache config. /// -/// The task graph stores per-task cache config without applying the global kill switch. -/// This function applies the global config at plan time, checking `cache.scripts` for -/// package.json scripts and `cache.tasks` for task-map entries. +/// The task graph stores per-task cache config without applying the global config. +/// This function applies it at plan time, checking `cache.scripts` for package.json +/// scripts and `cache.tasks` for task-map entries, and using the workspace's +/// `cache.platform` for a task that doesn't set its own. fn effective_cache_config( task_cache_config: Option<&CacheConfig>, source: TaskSource, @@ -78,7 +79,12 @@ fn effective_cache_config( TaskSource::PackageJsonScript => resolved_global_cache.scripts, TaskSource::TaskConfig => resolved_global_cache.tasks, }; - if enabled { task_cache_config.cloned() } else { None } + if !enabled { + return None; + } + let mut cache_config = task_cache_config?.clone(); + cache_config.platform.get_or_insert(resolved_global_cache.platform); + Some(cache_config) } /// - `with_hooks`: whether to look up `preX`/`postX` lifecycle hooks for this task. @@ -462,6 +468,8 @@ pub enum ParentCacheConfig { /// - If the parent enables caching but the synthetic disables it, caching is disabled. /// - If both parent and synthetic enable caching, the synthetic inherits the parent's /// env config and merges in any additional envs the synthetic command needs. +/// It uses the remote cache only if both allow it, and its `platform` is the +/// parent's plus any parts that the synthetic command lists. /// - If there is no parent (top-level invocation), the synthetic task's own /// [`UserCacheConfig`] is resolved with defaults. fn resolve_synthetic_cache_config( @@ -494,9 +502,18 @@ fn resolve_synthetic_cache_config( Ok(match synthetic_cache_config.into_enabled() { Option::None => Option::None, Some(enabled_cache_config) => { - let EnabledCacheConfig { env, untracked_env, input, output, remote } = + let EnabledCacheConfig { env, untracked_env, input, output, remote, platform } = enabled_cache_config; parent_config.remote_cache_allowed &= remote.unwrap_or(true); + if let Some(platform) = platform { + // The parent's platform is set by `effective_cache_config`. + parent_config.platform = Some( + parent_config + .platform + .unwrap_or(CachePlatform::ALL) + .union(CachePlatform::from_dimensions(&platform)), + ); + } parent_config.env_config.fingerprinted_envs.extend(env.unwrap_or_default()); parent_config .env_config @@ -695,6 +712,10 @@ fn plan_spawn_execution( execution_cache_key, input_config: cache_config.input_config.clone(), output_config: cache_config.output_config.clone(), + // A task's platform is set by `effective_cache_config`. A + // synthetic run outside `vp run` has no workspace config, and no + // remote cache either. + platform: cache_config.platform.unwrap_or(CachePlatform::ALL), remote_cache: if cache_config.remote_cache_allowed { resolved_remote_cache.cloned() } else { @@ -961,7 +982,8 @@ mod tests { use rustc_hash::FxHashSet; use vt_graph::config::{ - CacheConfig, EnabledCacheConfig, EnvConfig, GlobResolver, ResolvedGlobConfig, + CacheConfig, CachePlatform, EnabledCacheConfig, EnvConfig, GlobResolver, PlatformDimension, + ResolvedGlobConfig, user::{UserCacheConfig, UserInputEntry}, }; use vt_path::AbsolutePathBuf; @@ -986,6 +1008,7 @@ mod tests { fn parent_config(includes_auto: bool, positive_globs: &[&str]) -> CacheConfig { CacheConfig { remote_cache_allowed: true, + platform: Some(CachePlatform::ALL), env_config: EnvConfig { fingerprinted_envs: FxHashSet::default(), untracked_env: FxHashSet::default(), @@ -1019,6 +1042,7 @@ mod tests { input: None, output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1043,6 +1067,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1067,6 +1092,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1097,6 +1123,7 @@ mod tests { ]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1125,6 +1152,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1151,6 +1179,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1175,10 +1204,18 @@ mod tests { assert!(result.is_none()); } - #[test] - fn synthetic_disables_remote_cache_despite_parent() { + /// Resolve a synthetic task whose `cache.remote` and `cache.platform` are + /// `synthetic_remote` and `synthetic_platform`, under a parent that allows + /// the remote cache and depends on `parent_platform`. Returns the result's + /// `remote_cache_allowed` and `platform`. + fn synthetic_remote_settings( + parent_platform: CachePlatform, + synthetic_remote: Option, + synthetic_platform: Option>, + ) -> (bool, Option) { let (pkg, ws) = test_paths(); - let parent = parent_config(true, &["src/**"]); + let mut parent = parent_config(true, &["src/**"]); + parent.platform = Some(parent_platform); let result = resolve_synthetic_cache_config( ParentCacheConfig::Inherited(parent), UserCacheConfig::with_config(EnabledCacheConfig { @@ -1186,7 +1223,8 @@ mod tests { untracked_env: None, input: None, output: None, - remote: Some(false), + remote: synthetic_remote, + platform: synthetic_platform, }), &pkg, &ws, @@ -1194,7 +1232,34 @@ mod tests { ) .unwrap() .unwrap(); - assert!(!result.remote_cache_allowed); + (result.remote_cache_allowed, result.platform) + } + + #[test] + fn synthetic_disables_remote_cache_despite_parent() { + let (allowed, _) = synthetic_remote_settings(CachePlatform::ALL, Some(false), None); + assert!(!allowed); + } + + #[test] + fn synthetic_platform_adds_to_the_parents() { + let none = CachePlatform { os: false, arch: false }; + let os = CachePlatform { os: true, arch: false }; + // A synthetic command that lists nothing keeps the parent's platform. + assert_eq!(synthetic_remote_settings(none, None, None), (true, Some(none))); + // Its parts are added to the parent's, so it can't remove any. + assert_eq!( + synthetic_remote_settings(none, None, Some(vec![PlatformDimension::Os])), + (true, Some(os)) + ); + assert_eq!( + synthetic_remote_settings(os, None, Some(vec![PlatformDimension::Arch])), + (true, Some(CachePlatform::ALL)) + ); + assert_eq!( + synthetic_remote_settings(CachePlatform::ALL, None, Some(vec![])), + (true, Some(CachePlatform::ALL)) + ); } #[test] @@ -1209,6 +1274,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("!dist/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc index 45748a3e1..a8484595b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc @@ -66,6 +66,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md index 4ecb373ed..8915f792c 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc index 604871cc0..f88c115cf 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_task_caching_even_when_cache_tasks_is_false.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_task_caching_even_when_cache_tasks_is_false.jsonc index 3eb7fdcaa..4e891892e 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_task_caching_even_when_cache_tasks_is_false.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_task_caching_even_when_cache_tasks_is_false.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_on_task_with_per_task_cache_true_enables_caching.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_on_task_with_per_task_cache_true_enables_caching.jsonc index fc9b52e7c..2360e5f52 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_on_task_with_per_task_cache_true_enables_caching.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_on_task_with_per_task_cache_true_enables_caching.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md index 512da2f2f..9a1ef2231 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/task_graph.md @@ -26,6 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -128,6 +130,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -168,6 +171,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md index f132ba7e7..c612a3d05 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_config_forms/snapshots/task_graph.md @@ -26,6 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -88,6 +89,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [ "MY_ENV" @@ -137,6 +139,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -177,6 +180,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md index 80bae33ee..8bb2f8819 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/package.json b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/package.json new file mode 100644 index 000000000..1b8a14255 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/package.json @@ -0,0 +1,6 @@ +{ + "name": "@test/cache-platform", + "scripts": { + "script": "vtt print-file package.json" + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots.toml b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots.toml new file mode 100644 index 000000000..cb0a36039 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots.toml @@ -0,0 +1,27 @@ +# `cache.platform` lists the parts of the platform that a task's remote cache +# entries depend on. A task or a cached script that doesn't set it uses the +# workspace root's, which is `["arch"]` here. +[fields] +key = true +cache_metadata = { platform = true } + +[[plan]] +name = "script_uses_workspace_platform" +args = ["run", "script"] + +[[plan]] +name = "task_uses_workspace_platform" +args = ["run", "inherit"] + +[[plan]] +name = "task_shares_between_platforms" +args = ["run", "shared"] + +[[plan]] +name = "task_depends_on_os" +args = ["run", "os-only"] + +# `vt tool` lists no platform, so it keeps the platform of the task that runs it. +[[plan]] +name = "tool_keeps_task_platform" +args = ["run", "tool"] diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_script_uses_workspace_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_script_uses_workspace_platform.jsonc new file mode 100644 index 000000000..943383042 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_script_uses_workspace_platform.jsonc @@ -0,0 +1,29 @@ +// run script +{ + "graph": [ + { + "key": [ + "/", + "script" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "platform": { + "os": false, + "arch": true + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_depends_on_os.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_depends_on_os.jsonc new file mode 100644 index 000000000..19c7e0bc6 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_depends_on_os.jsonc @@ -0,0 +1,29 @@ +// run os-only +{ + "graph": [ + { + "key": [ + "/", + "os-only" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "platform": { + "os": true, + "arch": false + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_shares_between_platforms.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_shares_between_platforms.jsonc new file mode 100644 index 000000000..610d281f8 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_shares_between_platforms.jsonc @@ -0,0 +1,29 @@ +// run shared +{ + "graph": [ + { + "key": [ + "/", + "shared" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "platform": { + "os": false, + "arch": false + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_uses_workspace_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_uses_workspace_platform.jsonc new file mode 100644 index 000000000..bba4ed496 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_uses_workspace_platform.jsonc @@ -0,0 +1,29 @@ +// run inherit +{ + "graph": [ + { + "key": [ + "/", + "inherit" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "platform": { + "os": false, + "arch": true + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_tool_keeps_task_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_tool_keeps_task_platform.jsonc new file mode 100644 index 000000000..f8686e550 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_tool_keeps_task_platform.jsonc @@ -0,0 +1,29 @@ +// run tool +{ + "graph": [ + { + "key": [ + "/", + "tool" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "platform": { + "os": false, + "arch": false + } + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/task_graph.md new file mode 100644 index 000000000..733ba9073 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/task_graph.md @@ -0,0 +1,225 @@ +# task graph + +```mermaid +flowchart TD + task_0["/#inherit"] + task_1["/#os-only"] + task_2["/#script"] + task_3["/#shared"] + task_4["/#tool"] +``` + +## `/#inherit` + +```json +{ + "task_display": { + "package_name": "@test/cache-platform", + "task_name": "inherit", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "platform": null, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#os-only` + +```json +{ + "task_display": { + "package_name": "@test/cache-platform", + "task_name": "os-only", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "platform": { + "os": true, + "arch": false + }, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#script` + +```json +{ + "task_display": { + "package_name": "@test/cache-platform", + "task_name": "script", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "platform": null, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "PackageJsonScript" +} +``` + +## `/#shared` + +```json +{ + "task_display": { + "package_name": "@test/cache-platform", + "task_name": "shared", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "platform": { + "os": false, + "arch": false + }, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + +## `/#tool` + +```json +{ + "task_display": { + "package_name": "@test/cache-platform", + "task_name": "tool", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vt tool print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "platform": { + "os": false, + "arch": false + }, + "env_config": { + "fingerprinted_envs": [], + "untracked_env": [ + "" + ] + }, + "input_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + }, + "output_config": { + "includes_auto": true, + "positive_globs": [], + "negative_globs": [] + } + } + } + }, + "source": "TaskConfig" +} +``` + diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/vite-task.json b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/vite-task.json new file mode 100644 index 000000000..2f9e8ee71 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/vite-task.json @@ -0,0 +1,21 @@ +{ + // Tasks and cached scripts that don't set `cache.platform` use this one. + "cache": { "scripts": true, "platform": ["arch"] }, + "tasks": { + "inherit": { + "command": "vtt print-file package.json" + }, + "shared": { + "command": "vtt print-file package.json", + "cache": { "platform": [] } + }, + "os-only": { + "command": "vtt print-file package.json", + "cache": { "platform": ["os"] } + }, + "tool": { + "command": "vt tool print-file package.json", + "cache": { "platform": [] } + } + } +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md index 6410e19de..d4482ae4d 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md index 7a97e8f48..b3ebca282 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_enabled/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc index 8a6caba80..216c0ac62 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc index f9fbaca53..409d707e5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md index b78448b99..481aa0191 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md index 05e680687..3c657003c 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_sharing/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md index 276653f1f..ce7836184 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md index fb449cc1e..d87c2ebe6 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc index 08de6d9bc..ba77bd5ce 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc index 54514b545..9a799ef91 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md index 013228324..741bcd6c6 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/task_graph.md @@ -46,6 +46,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -86,6 +87,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_lint_should_put_synthetic_task_under_cwd.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_lint_should_put_synthetic_task_under_cwd.jsonc index 026ca636c..ea00d82b4 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_lint_should_put_synthetic_task_under_cwd.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_lint_should_put_synthetic_task_under_cwd.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_run_should_not_affect_expanded_task_cwd.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_run_should_not_affect_expanded_task_cwd.jsonc index 8944dc423..b751983ff 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_run_should_not_affect_expanded_task_cwd.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/query_cd_before_vt_run_should_not_affect_expanded_task_cwd.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md index 38a31e0aa..3976e477f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cd_in_scripts/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md index bd77a19c1..5a24c0906 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/comprehensive_task_graph/snapshots/task_graph.md @@ -44,6 +44,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -84,6 +85,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -124,6 +126,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -164,6 +167,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -204,6 +208,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -244,6 +249,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -284,6 +290,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -324,6 +331,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -364,6 +372,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -404,6 +413,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -444,6 +454,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -484,6 +495,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -524,6 +536,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -564,6 +577,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -604,6 +618,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -644,6 +659,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -684,6 +700,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -724,6 +741,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -764,6 +782,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -804,6 +823,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -844,6 +864,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -884,6 +905,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -924,6 +946,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md index ae8c28f1e..708bb8a89 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/conflict_test/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/packages/scope-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/packages/scope-a-b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/packages/test-package", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md index 8a1963a7b..8880a9281 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/cycle_dependency/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md index 3d286a163..aa3a501c5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/dependency_both_topo_and_explicit/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md index b1fac46d5..f9cdabec5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/duplicate_package_names/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/packages/pkg-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/pkg-b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md index 7439fe3de..6db2c4c03 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/empty_package_test/snapshots/task_graph.md @@ -35,6 +35,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -97,6 +98,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -137,6 +139,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -177,6 +180,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -217,6 +221,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -257,6 +262,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -297,6 +303,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -337,6 +344,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md index 476b79597..77cedb32f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_unix/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [ "foo", @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md index 476b79597..77cedb32f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/env_name_overrides_windows/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [ "foo", @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md index 0088fa12e..9cfe80dac 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/explicit_deps_workspace/snapshots/task_graph.md @@ -38,6 +38,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -100,6 +101,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -140,6 +142,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -180,6 +183,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -220,6 +224,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -260,6 +265,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -300,6 +306,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -340,6 +347,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -380,6 +388,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -420,6 +429,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/query_extra_args_only_reach_requested_task.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/query_extra_args_only_reach_requested_task.jsonc index 28e005861..5310b7377 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/query_extra_args_only_reach_requested_task.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/query_extra_args_only_reach_requested_task.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -153,6 +157,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md index bce2a45b1..0cabfd4aa 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/extra_args_not_forwarded_to_depends_on/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md index e40e075f9..281ed0421 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/filter_workspace/snapshots/task_graph.md @@ -34,6 +34,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -74,6 +75,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -114,6 +116,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -154,6 +157,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -194,6 +198,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -234,6 +239,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -274,6 +280,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -314,6 +321,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -354,6 +362,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -394,6 +403,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -434,6 +444,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -474,6 +485,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -514,6 +526,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md index c57055a81..73f82d44a 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/input_trailing_slash/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md index 395f58b32..ebc48f923 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/input_workspace_base/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc index 9f13cf8dd..eb856d2e2 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc index ef04c8b5e..6f9de00a3 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc index feddfd3a1..5f2341e3a 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md index f9faff974..1f5f23f43 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md index 09d1d40a0..16bb62098 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/nested_tasks/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/non_ascii_commands/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/non_ascii_commands/snapshots/task_graph.md index 6e0a271e2..37d37b454 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/non_ascii_commands/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/non_ascii_commands/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md index 83ccf1218..e1c6ffc74 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_duplicate_fields/snapshots/task_graph.md @@ -26,6 +26,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md index 8f9a28c40..46d84e737 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/object_depends_on_global_graph/snapshots/task_graph.md @@ -37,6 +37,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -77,6 +78,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -117,6 +119,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -157,6 +160,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -197,6 +201,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -237,6 +242,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -277,6 +283,7 @@ flowchart TD "cwd": "/packages/peer-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -317,6 +324,7 @@ flowchart TD "cwd": "/packages/prod-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -357,6 +365,7 @@ flowchart TD "cwd": "/packages/prod-missing-task", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -397,6 +406,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md index 037b1f2d0..11597daca 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/package_self_dependency/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/packages/self-dep", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md index 92d6d98fa..b1bb1e68f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/parallel_and_concurrency/snapshots/task_graph.md @@ -26,6 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -146,6 +149,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -186,6 +190,7 @@ flowchart TD "cwd": "/packages/c", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md index 2a86e92dc..67a5b7861 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/pnpm_workspace_packages_optional/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md index 0c3cfab7b..cc40c7d83 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/prefix_env_path_lookup/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md index 173248f97..9bba1f4fb 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/recursive_topological_workspace/snapshots/task_graph.md @@ -29,6 +29,7 @@ flowchart TD "cwd": "/apps/web", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -69,6 +70,7 @@ flowchart TD "cwd": "/apps/web", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -109,6 +111,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -149,6 +152,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -189,6 +193,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -229,6 +234,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -269,6 +275,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -309,6 +316,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md index 093fbdb8c..876d1cd79 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/task_graph.md @@ -31,6 +31,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -71,6 +72,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -111,6 +113,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -151,6 +154,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -191,6 +195,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -231,6 +236,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -271,6 +277,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -311,6 +318,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -351,6 +359,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -391,6 +400,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [ "VP_REMOTE_CACHE", diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md index 2bc564422..710e48b97 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md index 54dd61816..6a898c9c1 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks/snapshots/task_graph.md @@ -27,6 +27,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,6 +109,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -147,6 +150,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -187,6 +191,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -227,6 +232,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md index 88c6e57c0..39ffb7c17 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_disabled/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md index 74e5b0cbf..35128ac21 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_nested_run/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md index ba2702aa0..a7d40de3b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/script_hooks_task_no_hook/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc index 0ec13e88d..09a938069 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md index 8d7eb3d75..306ae4078 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc index 100438292..fd5ea6b7d 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc index 12f6bb53a..dc2ede528 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc index f530dc30a..eee644943 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc @@ -65,6 +65,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc index 93e4bb4ab..499f3f4ce 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md index 3c64bb07b..2dac3144d 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/task_graph.md @@ -28,6 +28,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -68,6 +69,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -130,6 +132,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -170,6 +173,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -211,6 +215,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc index 4893f55aa..865448a69 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc @@ -89,6 +89,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md index 90cd4887b..abcd6bd23 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc index d11cc707d..bcd551438 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -134,6 +138,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -204,6 +212,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc index f1cffb9ab..173ee8e5b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -134,6 +138,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -204,6 +212,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc index 316592697..c853090ac 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -134,6 +138,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc index 2b0f7a85d..8a2cffda5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -134,6 +138,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -204,6 +212,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc index 42d09c136..5cddf44a5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -159,6 +163,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc index 7013344d9..555f6bfb7 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -134,6 +138,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -204,6 +212,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { @@ -295,6 +307,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc index be1f6fbdd..5aaff3cca 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md index 3cea5db77..3350327c4 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/task_graph.md @@ -31,6 +31,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -73,6 +74,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -114,6 +116,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -155,6 +158,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -196,6 +200,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -238,6 +243,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -278,6 +284,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/task_graph_json/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/task_graph_json/snapshots/task_graph.md index 0170cfbf4..e68c9c696 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/task_graph_json/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/task_graph_json/snapshots/task_graph.md @@ -30,6 +30,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -70,6 +71,7 @@ flowchart TD "cwd": "/packages/a#b%c", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -110,6 +112,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -150,6 +153,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -190,6 +194,7 @@ flowchart TD "cwd": "/packages/web/infra", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -230,6 +235,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md index e8b514a98..811c93dbb 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/transitive_skip_intermediate/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/packages/bottom", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/middle", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/packages/top", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md index ee2e7efa8..f4255ab9f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/vpr_shorthand/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc index 10c0e45fc..5e5bdc83f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc index 23c1762cb..fa29a15f7 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc @@ -64,6 +64,10 @@ "positive_globs": [], "negative_globs": [] }, + "platform": { + "os": true, + "arch": true + }, "remote_cache": null }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md index bfa4d9c63..b3e56cbd4 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md @@ -22,6 +22,7 @@ flowchart TD "cwd": "/packages/foo", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_non_member_package/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_non_member_package/snapshots/task_graph.md index e2d15939c..a4ba3d0e1 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_non_member_package/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_non_member_package/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md index 8a7401ecf..e986d0782 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_cd_no_skip/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md index 9d04d7938..9becd5ee7 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_depends_on_passthrough/snapshots/task_graph.md @@ -26,6 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -146,6 +149,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md index bef663384..fce065b5a 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_multi_command/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md index 9587811fc..f2b2377bb 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_mutual_recursion/snapshots/task_graph.md @@ -25,6 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md index 04bbae8a2..65fbc5f54 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_no_package_json/snapshots/task_graph.md @@ -23,6 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/pkg-a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md index 0ddad5eeb..f6b610636 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/workspace_root_self_reference/snapshots/task_graph.md @@ -24,6 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [