From a5c828aee597787035d7a378ade0d2dd83979098 Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Fri, 20 Nov 2026 22:41:54 +0800 Subject: [PATCH 1/4] feat(cache): share a task's remote cache entries between platforms with `cache.remote.crossPlatform` Every remote key starts with a header that names the OS and the architecture, so an entry that Linux CI stores is never fetched on macOS, even for a task whose outputs are the same on every platform. A task can now set `cache: { remote: { crossPlatform: true } }`. Its remote keys then have an empty OS and architecture, which no platform has. The default keys and the local cache don't change. Closes #926 Co-Authored-By: Claude Opus 5.5 --- crates/vt/src/session/cache/mod.rs | 44 ++-- crates/vt/src/session/cache/remote.rs | 192 ++++++++++++++---- .../fixtures/remote_cache/snapshots.toml | 85 ++++++++ .../remote_cache/snapshots/cross_platform.md | 82 ++++++++ .../fixtures/remote_cache/vite-task.json | 8 + crates/vt_graph/src/config/mod.rs | 15 +- crates/vt_graph/src/config/user.rs | 104 +++++++++- crates/vt_plan/src/cache_metadata.rs | 7 +- crates/vt_plan/src/plan.rs | 72 ++++++- crates/vt_plan/src/remote_cache.rs | 11 + .../additional_env/snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 4 + .../cache_keys/snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 3 + .../cache_sharing/snapshots/task_graph.md | 3 + .../cache_subcommand/snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 3 + .../snapshots/task_graph.md | 2 + .../cd_in_scripts/snapshots/task_graph.md | 3 + .../snapshots/task_graph.md | 23 +++ .../conflict_test/snapshots/task_graph.md | 3 + .../cycle_dependency/snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 8 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 10 + .../snapshots/task_graph.md | 2 + .../filter_workspace/snapshots/task_graph.md | 13 ++ .../snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 4 + .../nested_tasks/snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 3 + .../snapshots/task_graph.md | 10 + .../snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 5 + .../snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 8 + .../remote_cache_config/snapshots.toml | 10 + .../query_cli_overrides_invalid_env.jsonc | 3 +- .../query_controls_in_env_fingerprinted.jsonc | 3 +- .../snapshots/query_cross_platform.jsonc | 44 ++++ .../snapshots/query_default_read.jsonc | 3 +- ...query_empty_env_endpoint_uses_config.jsonc | 3 +- .../snapshots/query_github_oidc_auth.jsonc | 3 +- ...github_oidc_auth_needs_request_token.jsonc | 3 +- .../query_nested_cli_overrides_env.jsonc | 3 +- .../query_prefix_controls_fingerprinted.jsonc | 3 +- .../query_sibling_endpoint_isolation.jsonc | 6 +- .../query_sibling_mode_isolation.jsonc | 3 +- .../query_synthetic_cross_platform.jsonc | 44 ++++ .../snapshots/task_graph.md | 110 +++++++++- .../remote_cache_config/vite-task.json | 8 + .../query_endpoint_not_validated.jsonc | 3 +- .../query_nested_endpoint_enables_read.jsonc | 3 +- .../snapshots/task_graph.md | 2 + .../script_hooks/snapshots/task_graph.md | 6 + .../snapshots/task_graph.md | 3 + .../snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 2 + .../shell_fallback/snapshots/task_graph.md | 1 + .../snapshots/task_graph.md | 5 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 7 + .../task_graph_json/snapshots/task_graph.md | 6 + .../snapshots/task_graph.md | 3 + .../vpr_shorthand/snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 4 + .../snapshots/task_graph.md | 2 + .../snapshots/task_graph.md | 3 + 80 files changed, 984 insertions(+), 94 deletions(-) create mode 100644 crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc diff --git a/crates/vt/src/session/cache/mod.rs b/crates/vt/src/session/cache/mod.rs index d3cd3f2bf..e1c13bf2d 100644 --- a/crates/vt/src/session/cache/mod.rs +++ b/crates/vt/src/session/cache/mod.rs @@ -29,7 +29,7 @@ use vt_graph::config::ResolvedGlobConfig; use vt_path::{AbsolutePath, AbsolutePathBuf, RelativePathBuf}; use vt_plan::{ cache_metadata::{CacheMetadata, ExecutionCacheKey, SpawnFingerprint}, - remote_cache::{RemoteCacheAccess, ResolvedRemoteCacheConfig}, + remote_cache::{ExecutionRemoteCache, RemoteCacheAccess, ResolvedRemoteCacheConfig}, }; use vt_remote_cache::Fetched; use vt_str::Str; @@ -39,7 +39,7 @@ use wincode::{ error::{ReadResult, WriteResult}, }; -use self::remote::{ReadError, RemoteClients, RemoteUploads, Restore, UploadError}; +use self::remote::{KeyPlatform, ReadError, RemoteClients, RemoteUploads, Restore, UploadError}; use super::{ event::RunKind, execute::{ @@ -676,19 +676,23 @@ impl ExecutionCache { clippy::manual_let_else, reason = "naming every access mode makes adding one a compile error here" )] - let remote_config = match &cache_metadata.remote_cache { + let remote_cache = match &cache_metadata.remote_cache { Some( - remote_config @ ResolvedRemoteCacheConfig { - access: RemoteCacheAccess::Read | RemoteCacheAccess::ReadWrite, + remote_cache @ ExecutionRemoteCache { + config: + ResolvedRemoteCacheConfig { + access: RemoteCacheAccess::Read | RemoteCacheAccess::ReadWrite, + .. + }, .. }, - ) => remote_config, + ) => remote_cache, None => return Ok(Some(Err(local_miss))), }; let start = Instant::now(); let remote_lookup = self .try_hit_remote( - remote_config, + remote_cache, cache_metadata, &cache_key, &validation, @@ -782,7 +786,7 @@ impl ExecutionCache { Ok(Some(Err(CacheMiss::NotFound))) } - /// Fetch the entry from the remote cache that `remote_config` configures. + /// Fetch the entry from `remote_cache`. /// An exact entry that passes validation is a hit once its output archive /// is downloaded, or right away in a dry run. /// A fallback entry, a failed validation, or a failed read is a miss. An @@ -792,7 +796,7 @@ impl ExecutionCache { #[expect(clippy::too_many_arguments, reason = "forwarded from `try_hit`")] async fn try_hit_remote( &self, - remote_config: &ResolvedRemoteCacheConfig, + remote_cache: &ExecutionRemoteCache, cache_metadata: &CacheMetadata, cache_key: &CacheEntryKey, validation: &Validation, @@ -803,7 +807,7 @@ 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_cache, 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 +824,11 @@ impl ExecutionCache { ); let (cache_key, validation, dir) = (cache_key.clone(), validation.clone(), self.dir.clone()); + let platform = KeyPlatform::of(remote_cache); let check = move || { remote::resolve( fetched, + platform, &cache_key, |cache_value| validation.validate(cache_value), |cache_value| { @@ -857,7 +863,7 @@ impl ExecutionCache { Some(blob_id) => { match self .remote_clients - .download_archive(remote_config, &blob_id, cache_dir, cancel_token) + .download_archive(&remote_cache.config, &blob_id, cache_dir, cancel_token) .await { Ok(archive_name) => Some(archive_name), @@ -995,19 +1001,23 @@ impl ExecutionCache { tracing::debug!(elapsed = ?start.elapsed(), "recorded the cache entry locally"); let upload_error = Arc::new(OnceLock::new()); - let remote_config = match &cache_metadata.remote_cache { + let remote_cache = match &cache_metadata.remote_cache { Some( - remote_config @ ResolvedRemoteCacheConfig { - access: RemoteCacheAccess::ReadWrite, + remote_cache @ ExecutionRemoteCache { + config: ResolvedRemoteCacheConfig { access: RemoteCacheAccess::ReadWrite, .. }, .. }, - ) => remote_config, - Some(ResolvedRemoteCacheConfig { access: RemoteCacheAccess::Read, .. }) | None => { + ) => remote_cache, + Some(ExecutionRemoteCache { + config: ResolvedRemoteCacheConfig { access: RemoteCacheAccess::Read, .. }, + .. + }) + | None => { return Ok(upload_error); } }; match self.remote_clients.prepare_upload( - remote_config, + remote_cache, &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..cbe8ef844 100644 --- a/crates/vt/src/session/cache/remote.rs +++ b/crates/vt/src/session/cache/remote.rs @@ -11,7 +11,9 @@ //! //! 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 task that sets +//! `cache.remote.crossPlatform` shares its entries between platforms instead: +//! its header has an empty OS and architecture (see [`KeyPlatform`]). use std::{ fs::File, @@ -28,7 +30,7 @@ use tracing::Instrument as _; use vt_path::AbsolutePath; use vt_plan::{ cache_metadata::ExecutionCacheKey, - remote_cache::{RemoteCacheAuth, ResolvedRemoteCacheConfig}, + remote_cache::{ExecutionRemoteCache, RemoteCacheAuth, ResolvedRemoteCacheConfig}, }; use vt_remote_cache::{ Client, Download, Entry, Fetched, @@ -126,10 +128,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: KeyPlatform, cache_key: &CacheEntryKey, mut validate: impl FnMut(&CacheEntryValue) -> anyhow::Result, mut describe: impl FnMut(&CacheEntryValue) -> Option>, @@ -137,7 +141,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), @@ -219,20 +223,20 @@ impl RemoteClients { Ok(client) } - /// 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. + /// Fetch the entries stored under `cache_key` in `remote_cache`, falling + /// back to the key last stored for `execution_cache_key`. Returns `None` + /// if neither key matched. Stops when `cancel_token` is cancelled. pub(super) async fn fetch( &self, - remote_config: &ResolvedRemoteCacheConfig, + remote_cache: &ExecutionRemoteCache, 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 client = self.client(&remote_cache.config).map_err(ReadError::Fetch)?; + let platform = KeyPlatform::of(remote_cache); + 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 @@ -276,23 +280,24 @@ 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. + /// its output archive in `cache_dir`, to `remote_cache`: 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. pub(super) fn prepare_upload( &self, - remote_config: &ResolvedRemoteCacheConfig, + remote_cache: &ExecutionRemoteCache, cache_key: &CacheEntryKey, execution_cache_key: &ExecutionCacheKey, cache_value: &CacheEntryValue, cache_dir: &AbsolutePath, ) -> 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 client = self.client(&remote_cache.config)?; + let platform = KeyPlatform::of(remote_cache); + 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 +533,58 @@ struct KeyHeader { arch: Str, } -/// The key header for this build. -fn encode_header() -> WriteResult> { +/// The OS and architecture in a task's key header, which decide the +/// platforms that share its remote entries. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub(super) enum KeyPlatform { + /// This build's OS and architecture, so only builds for the same target + /// share the entries. + Current, + /// An empty OS and architecture, so builds for every target share the + /// entries. No target has an empty name, so these keys never equal a + /// [`Self::Current`] key. + Any, +} + +impl KeyPlatform { + /// The key platform of a task that uses `remote_cache`. + pub(super) const fn of(remote_cache: &ExecutionRemoteCache) -> Self { + if remote_cache.cross_platform { Self::Any } else { Self::Current } + } + + /// The OS and architecture that the key header names. + const fn os_and_arch(self) -> (&'static str, &'static str) { + match self { + Self::Current => (std::env::consts::OS, std::env::consts::ARCH), + Self::Any => ("", ""), + } + } +} + +/// The key header for this build and `platform`. +fn encode_header(platform: KeyPlatform) -> WriteResult> { + let (os, arch) = platform.os_and_arch(); 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(os), + arch: Str::from(arch), }) } -/// 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: KeyPlatform, + 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: KeyPlatform, 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 +728,8 @@ 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, KeyPlatform::Current, &key, not_validated, no_baseline).unwrap_err() + { CacheMiss::RemoteReadFailed(error) => { assert_eq!(vt_str::format!("{error}"), "remote cache value is corrupt"); error @@ -705,6 +743,7 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let restore = resolve( Ok(Some(exact(&cache_value()))), + KeyPlatform::Current, &key, validate_against(BTreeMap::new()), no_baseline, @@ -720,6 +759,7 @@ mod tests { let current_inputs = BTreeMap::from([(RelativePathBuf::new("src/a.txt").unwrap(), 1)]); let miss = resolve( Ok(Some(exact(&cache_value()))), + KeyPlatform::Current, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(current_inputs), no_baseline, @@ -741,6 +781,7 @@ mod tests { let entries = vec![entry(&cache_value(), "2"), entry(&cache_value(), "1")]; let restore = resolve( Ok(Some(Fetched::Exact { entries })), + KeyPlatform::Current, &key, validate_against(BTreeMap::new()), no_baseline, @@ -762,6 +803,7 @@ mod tests { let mut validate = validate_against(inputs(&["src/a.txt"])); let restore = resolve( Ok(Some(Fetched::Exact { entries })), + KeyPlatform::Current, &key, |value| { validated += 1; @@ -782,6 +824,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 })), + KeyPlatform::Current, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -795,6 +838,7 @@ mod tests { ]; let miss = resolve( Ok(Some(Fetched::Exact { entries })), + KeyPlatform::Current, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -813,6 +857,7 @@ mod tests { .insert(TrackedEnvQuery::Glob(Str::from("PROBE_[")), BTreeMap::new()); let miss = resolve( Ok(Some(exact(&value))), + KeyPlatform::Current, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(BTreeMap::new()), no_baseline, @@ -823,11 +868,14 @@ 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(KeyPlatform::Current, &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 })), + KeyPlatform::Current, &cache_key(input_config), not_validated, no_baseline, @@ -849,7 +897,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), KeyPlatform::Current, &key, not_validated, no_baseline).unwrap_err(); assert!(matches!(miss, CacheMiss::NotFound), "{miss:?}"); } @@ -857,7 +906,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, KeyPlatform::Current, &key, not_validated, no_baseline).unwrap_err(); assert_eq!(read_failure(miss), "remote cache fetch failed"); } @@ -924,7 +974,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, KeyPlatform::Current, &key, not_validated, no_baseline) + .unwrap_err(); assert_eq!(read_failure(miss), "remote cache entry's blob doesn't match its value"); } } @@ -945,15 +996,71 @@ 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(KeyPlatform::Current).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, KeyPlatform::Current, &key, not_validated, no_baseline) + .unwrap_err(); assert_eq!(read_failure(miss), "remote cache key is corrupt"); } } + /// 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_the_platform_unless_cross_platform() { + let key = cache_key(ResolvedGlobConfig::default_auto()); + let encoded = serialize_cache(&key).unwrap(); + let current = encode_key(KeyPlatform::Current, &key).unwrap(); + assert_eq!( + current, + [header_for(std::env::consts::OS, std::env::consts::ARCH), encoded.clone()].concat() + ); + // The header names no target, so every platform encodes the same key. + let any = encode_key(KeyPlatform::Any, &key).unwrap(); + assert_eq!(any, [header_for("", ""), encoded].concat()); + assert_ne!(current, any); + } + + #[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 [ + (KeyPlatform::Any, KeyPlatform::Any, true), + (KeyPlatform::Current, KeyPlatform::Any, false), + (KeyPlatform::Any, KeyPlatform::Current, 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 { @@ -1014,8 +1121,9 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let execution_key = ExecutionCacheKey::ExecAPI(Arc::from([])); + let remote_cache = ExecutionRemoteCache { config: remote_config, cross_platform: false }; let clients = RemoteClients::default(); - let fetch = clients.fetch(&remote_config, &key, &execution_key, &cancel_token); + let fetch = clients.fetch(&remote_cache, &key, &execution_key, &cancel_token); let (fetched, ()) = tokio::join!(fetch, async { requested.await.unwrap(); cancel_token.cancel(); @@ -1058,7 +1166,9 @@ 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) + let remote_cache = + ExecutionRemoteCache { config: remote_config.clone(), cross_platform: false }; + clients.prepare_upload(&remote_cache, &key, &execution_key, &value, &cache_dir) } fn upload_error(error: &OnceLock) -> Option { 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..c9c2e730d 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.remote.crossPlatform`, 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 = "cross_platform" +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 cross-platform keys is a remote hit." }, + { argv = [ + "vtt", + "print-file", + "dist/generated.txt", + ], comment = "The outputs are restored." }, + [ + "vtt", + "replace-file-content", + "vite-task.json", + '"crossPlatform": true', + '"crossPlatform": false', + ], + { 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/cross_platform.md b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md new file mode 100644 index 000000000..475910e90 --- /dev/null +++ b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md @@ -0,0 +1,82 @@ +# cross_platform + +## `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 cross-platform keys 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 '"crossPlatform": true' '"crossPlatform": false'` + +``` +``` + +## `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..984a79d1f 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/**"], + "remote": { "crossPlatform": true } + } } } } diff --git a/crates/vt_graph/src/config/mod.rs b/crates/vt_graph/src/config/mod.rs index 3f2eecff3..46fee7337 100644 --- a/crates/vt_graph/src/config/mod.rs +++ b/crates/vt_graph/src/config/mod.rs @@ -6,10 +6,11 @@ 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, EnabledTaskRemoteCacheConfig, GlobWithBase, + InputBase, ResolvedGlobalCacheConfig, UserCacheConfig, UserDependencyType, UserDependsOnEntry, + UserDependsOnFrom, UserGlobalCacheConfig, UserInputEntry, UserInputsConfig, UserOutputEntry, UserPackageDependency, UserRunConfig, UserTaskConfig, UserTaskDefinition, + UserTaskRemoteCacheConfig, }; use vt_path::AbsolutePath; use vt_str::Str; @@ -85,8 +86,11 @@ impl ResolvedTaskOptions { glob_resolver, )?; + let remote = enabled_cache_config.remote.unwrap_or_default().into_enabled(); Some(CacheConfig { - remote_cache_allowed: enabled_cache_config.remote.unwrap_or(true), + remote_cache_allowed: remote.is_some(), + remote_cache_cross_platform: remote + .is_some_and(|remote| remote.cross_platform.unwrap_or(false)), env_config: EnvConfig { fingerprinted_envs: enabled_cache_config .env @@ -108,6 +112,9 @@ 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, + /// Whether the task's `cache.remote.crossPlatform` shares its remote cache + /// entries between platforms. It's `false` when remote caching isn't allowed. + pub remote_cache_cross_platform: bool, pub env_config: EnvConfig, pub input_config: ResolvedGlobConfig, pub output_config: ResolvedGlobConfig, diff --git a/crates/vt_graph/src/config/user.rs b/crates/vt_graph/src/config/user.rs index 92f00a2ef..a34ec37b1 100644 --- a/crates/vt_graph/src/config/user.rs +++ b/crates/vt_graph/src/config/user.rs @@ -243,7 +243,11 @@ pub struct EnabledCacheConfig { #[cfg_attr(all(test, not(clippy)), ts(inline))] pub output: Option>, - /// Whether this task can use the remote cache. Defaults to `true`. + /// Whether and how this task uses the remote cache. + /// + /// - Omitted or `true`: the remote cache is used with default settings (same as `{}`) + /// - `false`: the remote cache isn't used + /// - Object: the remote cache is used with the given settings /// /// The remote cache is used only when these also hold: /// - Caching isn't turned off by `--no-cache` or the workspace root's `cache` setting. @@ -253,7 +257,66 @@ pub struct EnabledCacheConfig { /// defaults to `read`, which downloads cached results without uploading new ones. // Parsed but left out of the public types while remote caching is unreleased. #[cfg_attr(all(test, not(clippy)), ts(skip))] - pub remote: Option, + pub remote: Option, +} + +/// The value of a task's `cache.remote` field. +#[derive(Debug, PartialEq, Eq)] +pub enum UserTaskRemoteCacheConfig { + /// `true` uses the remote cache with default settings; `false` doesn't use it. + Bool(bool), + /// Uses the remote cache with the given settings. + Config(EnabledTaskRemoteCacheConfig), +} + +// Not `#[serde(untagged)]`, which replaces each variant's error with a generic one. +impl<'de> Deserialize<'de> for UserTaskRemoteCacheConfig { + fn deserialize>(deserializer: D) -> Result { + UntaggedEnumVisitor::new() + .expecting("a boolean or an object of remote cache settings") + .bool(|enabled| Ok(Self::Bool(enabled))) + .map(|map| map.deserialize().map(Self::Config)) + .deserialize(deserializer) + } +} + +impl Default for UserTaskRemoteCacheConfig { + /// The remote cache used with default settings, used when `cache.remote` is omitted. + fn default() -> Self { + Self::Bool(true) + } +} + +impl UserTaskRemoteCacheConfig { + /// Returns the remote cache settings, or `None` if the remote cache isn't used. + #[must_use] + pub fn into_enabled(self) -> Option { + match self { + Self::Bool(true) => Some(EnabledTaskRemoteCacheConfig::default()), + Self::Bool(false) => None, + Self::Config(config) => Some(config), + } + } +} + +/// A task's remote cache settings when it uses the remote cache. +#[derive(Debug, Default, Deserialize, PartialEq, Eq)] +#[serde(deny_unknown_fields, rename_all = "camelCase")] +pub struct EnabledTaskRemoteCacheConfig { + /// Whether the task's remote cache entries are shared between platforms. Defaults to + /// `false`. + /// + /// Set it only on a task whose outputs are the same on every OS and architecture, such + /// as a code generator that runs on Node.js. Its remote entries then don't name an OS or + /// architecture, so 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 the platform in a way that the cache doesn't track, such as a check + /// of `process.platform`, another platform's outputs are restored. + /// + /// The setting doesn't change the local cache. Changing it changes the task's remote + /// keys, so the task misses the remote cache once. + pub cross_platform: Option, } /// Options for user-defined tasks in `vite.config.*`, excluding the command. @@ -807,11 +870,37 @@ mod tests { untracked_env: Some(std::iter::once("FOO".into()).collect()), input: Some(vec![UserInputEntry::Glob("src/**".into())]), output: Some(vec![UserOutputEntry::Glob("dist/**".into())]), - remote: Some(false), + remote: Some(UserTaskRemoteCacheConfig::Bool(false)), }) ); } + #[test] + fn test_cache_remote_forms() { + let cases = [ + (json!(true), Some(EnabledTaskRemoteCacheConfig::default())), + (json!(false), None), + (json!({}), Some(EnabledTaskRemoteCacheConfig::default())), + ( + json!({ "crossPlatform": true }), + Some(EnabledTaskRemoteCacheConfig { cross_platform: Some(true) }), + ), + ( + json!({ "crossPlatform": false }), + Some(EnabledTaskRemoteCacheConfig { cross_platform: Some(false) }), + ), + ]; + for (remote, expected) in cases { + let user_config_json = json!({ "command": "echo test", "cache": { "remote": remote } }); + let remote = task_cache_config(user_config_json).unwrap().remote.unwrap(); + assert_eq!(remote.into_enabled(), expected); + } + assert_eq!( + UserTaskRemoteCacheConfig::default().into_enabled(), + Some(EnabledTaskRemoteCacheConfig::default()) + ); + } + #[test] fn test_cache_object_unknown_field_error() { let user_config_json = json!({ @@ -1106,6 +1195,15 @@ mod tests { json!({ "command": "echo", "cache": "yes" }), "invalid type: string \"yes\", expected a boolean or an object of cache settings", ), + ( + json!({ "command": "echo", "cache": { "remote": "yes" } }), + "invalid type: string \"yes\", expected a boolean or an object of remote cache \ + settings", + ), + ( + json!({ "command": "echo", "cache": { "remote": { "crossplatform": true } } }), + "unknown field `crossplatform`, expected `crossPlatform`", + ), (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..100df110c 100644 --- a/crates/vt_plan/src/cache_metadata.rs +++ b/crates/vt_plan/src/cache_metadata.rs @@ -9,7 +9,7 @@ use vt_str::{self, Str}; use wincode::{SchemaRead, SchemaWrite}; pub use crate::envs::EnvValueHash; -use crate::{envs::EnvFingerprints, remote_cache::ResolvedRemoteCacheConfig}; +use crate::{envs::EnvFingerprints, remote_cache::ExecutionRemoteCache}; /// Key to identify an execution across sessions. #[derive(Debug, SchemaWrite, SchemaRead, Serialize)] @@ -56,8 +56,9 @@ pub struct CacheMetadata { pub output_config: ResolvedGlobConfig, /// 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, + /// with the task's `cache.remote` settings, unless the task sets + /// `cache.remote: false`. `None` means local caching only. + pub remote_cache: Option, /// The unfiltered env context for runner-aware APIs. This is the planning /// context's envs before spawn-env filtering, including command prefix envs diff --git a/crates/vt_plan/src/plan.rs b/crates/vt_plan/src/plan.rs index 616d830a9..2339a9e1c 100644 --- a/crates/vt_plan/src/plan.rs +++ b/crates/vt_plan/src/plan.rs @@ -40,7 +40,7 @@ use crate::{ CacheOverride, PlanOptions, PlanRequest, QueryPlanRequest, ScriptCommand, SyntheticPlanRequest, }, - remote_cache::{self, ResolvedRemoteCacheConfig}, + remote_cache::{self, ExecutionRemoteCache, ResolvedRemoteCacheConfig}, resolve_cache_with_override, }; @@ -462,6 +462,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 shares its remote entries +/// between platforms if either declares `crossPlatform`. /// - If there is no parent (top-level invocation), the synthetic task's own /// [`UserCacheConfig`] is resolved with defaults. fn resolve_synthetic_cache_config( @@ -496,7 +498,12 @@ fn resolve_synthetic_cache_config( Some(enabled_cache_config) => { let EnabledCacheConfig { env, untracked_env, input, output, remote } = enabled_cache_config; - parent_config.remote_cache_allowed &= remote.unwrap_or(true); + let synthetic_remote = remote.unwrap_or_default().into_enabled(); + parent_config.remote_cache_allowed &= synthetic_remote.is_some(); + parent_config.remote_cache_cross_platform = parent_config.remote_cache_allowed + && (parent_config.remote_cache_cross_platform + || synthetic_remote + .is_some_and(|remote| remote.cross_platform.unwrap_or(false))); parent_config.env_config.fingerprinted_envs.extend(env.unwrap_or_default()); parent_config .env_config @@ -696,7 +703,10 @@ fn plan_spawn_execution( input_config: cache_config.input_config.clone(), output_config: cache_config.output_config.clone(), remote_cache: if cache_config.remote_cache_allowed { - resolved_remote_cache.cloned() + resolved_remote_cache.map(|config| ExecutionRemoteCache { + config: config.clone(), + cross_platform: cache_config.remote_cache_cross_platform, + }) } else { None }, @@ -961,7 +971,8 @@ mod tests { use rustc_hash::FxHashSet; use vt_graph::config::{ - CacheConfig, EnabledCacheConfig, EnvConfig, GlobResolver, ResolvedGlobConfig, + CacheConfig, EnabledCacheConfig, EnabledTaskRemoteCacheConfig, EnvConfig, GlobResolver, + ResolvedGlobConfig, UserTaskRemoteCacheConfig, user::{UserCacheConfig, UserInputEntry}, }; use vt_path::AbsolutePathBuf; @@ -986,6 +997,7 @@ mod tests { fn parent_config(includes_auto: bool, positive_globs: &[&str]) -> CacheConfig { CacheConfig { remote_cache_allowed: true, + remote_cache_cross_platform: false, env_config: EnvConfig { fingerprinted_envs: FxHashSet::default(), untracked_env: FxHashSet::default(), @@ -1186,7 +1198,7 @@ mod tests { untracked_env: None, input: None, output: None, - remote: Some(false), + remote: Some(UserTaskRemoteCacheConfig::Bool(false)), }), &pkg, &ws, @@ -1197,6 +1209,56 @@ mod tests { assert!(!result.remote_cache_allowed); } + /// Resolve a synthetic task whose `cache.remote` is `synthetic_remote` + /// under a parent whose remote cache settings are the given ones. Returns + /// the result's `remote_cache_allowed` and `remote_cache_cross_platform`. + fn synthetic_remote_cache( + parent_allowed: bool, + parent_cross_platform: bool, + synthetic_remote: Option, + ) -> (bool, bool) { + let (pkg, ws) = test_paths(); + let mut parent = parent_config(true, &["src/**"]); + parent.remote_cache_allowed = parent_allowed; + parent.remote_cache_cross_platform = parent_cross_platform; + let result = resolve_synthetic_cache_config( + ParentCacheConfig::Inherited(parent), + UserCacheConfig::with_config(EnabledCacheConfig { + env: None, + untracked_env: None, + input: None, + output: None, + remote: synthetic_remote, + }), + &pkg, + &ws, + &GlobResolver::default(), + ) + .unwrap() + .unwrap(); + (result.remote_cache_allowed, result.remote_cache_cross_platform) + } + + #[test] + fn synthetic_remote_cache_cross_platform() { + let cross_platform = || { + Some(UserTaskRemoteCacheConfig::Config(EnabledTaskRemoteCacheConfig { + cross_platform: Some(true), + })) + }; + // The parent's declaration is kept when the synthetic sets nothing. + assert_eq!(synthetic_remote_cache(true, true, None), (true, true)); + // The synthetic's declaration applies when the parent sets nothing. + assert_eq!(synthetic_remote_cache(true, false, cross_platform()), (true, true)); + assert_eq!(synthetic_remote_cache(true, false, None), (true, false)); + // A side that turns off the remote cache turns off sharing too. + assert_eq!( + synthetic_remote_cache(true, true, Some(UserTaskRemoteCacheConfig::Bool(false))), + (false, false) + ); + assert_eq!(synthetic_remote_cache(false, false, cross_platform()), (false, false)); + } + #[test] fn synthetic_negative_globs_merged() { let (pkg, ws) = test_paths(); diff --git a/crates/vt_plan/src/remote_cache.rs b/crates/vt_plan/src/remote_cache.rs index 26c9df37f..d8e92fef4 100644 --- a/crates/vt_plan/src/remote_cache.rs +++ b/crates/vt_plan/src/remote_cache.rs @@ -47,6 +47,17 @@ pub struct ResolvedRemoteCacheConfig { pub auth: RemoteCacheAuth, } +/// The remote cache that an execution uses: the one resolved for its `vp run` +/// level, with the task's own `cache.remote` settings. +#[derive(Debug, Clone, Serialize)] +pub struct ExecutionRemoteCache { + #[serde(flatten)] + pub config: ResolvedRemoteCacheConfig, + /// Whether the task's `cache.remote.crossPlatform` shares its entries + /// between platforms. Their remote keys then name no OS or architecture. + pub cross_platform: bool, +} + /// How requests to the remote cache authenticate. It holds everything needed /// to build the credentials, so nothing reads envs after planning. #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize)] 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..a7b3c5c17 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..5dc8d76b6 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -128,6 +130,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -168,6 +171,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..02ad16967 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -88,6 +89,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [ "MY_ENV" @@ -137,6 +139,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -177,6 +180,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..03cc741c9 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..d0d90a2dc 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..71a358a59 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..b790727ad 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..0cead37ea 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..7a8b573b4 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, + "remote_cache_cross_platform": false, "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..45212acda 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..7d816ee8d 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -86,6 +87,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..2f30a063a 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..dcd04124d 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -84,6 +85,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -124,6 +126,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -164,6 +167,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -204,6 +208,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -244,6 +249,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -284,6 +290,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -324,6 +331,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -364,6 +372,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -404,6 +413,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -444,6 +454,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -484,6 +495,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -524,6 +536,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -564,6 +577,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -604,6 +618,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -644,6 +659,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -684,6 +700,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -724,6 +741,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -764,6 +782,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -804,6 +823,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -844,6 +864,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -884,6 +905,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -924,6 +946,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..4e108f76a 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/packages/scope-a-b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/packages/test-package", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..d5d7e6b77 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..edb8d552e 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..ffa1bdc5d 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/pkg-b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..06220074f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -97,6 +98,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -137,6 +139,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -177,6 +180,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -217,6 +221,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -257,6 +262,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -297,6 +303,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -337,6 +344,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..432fe0d91 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [ "foo", @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..948988478 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -100,6 +101,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -140,6 +142,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -180,6 +183,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -220,6 +224,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -260,6 +265,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -300,6 +306,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -340,6 +347,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -380,6 +388,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -420,6 +429,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..1691a78a5 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..124e06a12 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -74,6 +75,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -114,6 +116,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -154,6 +157,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -194,6 +198,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -234,6 +239,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -274,6 +280,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -314,6 +321,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -354,6 +362,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -394,6 +403,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -434,6 +444,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -474,6 +485,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -514,6 +526,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..10529f33a 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, + "remote_cache_cross_platform": false, "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..c80546a24 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..b7e44c67f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..c53275a0c 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..a04c72763 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..127209445 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..1ea75b53a 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -77,6 +78,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -117,6 +119,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -157,6 +160,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -197,6 +201,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -237,6 +242,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -277,6 +283,7 @@ flowchart TD "cwd": "/packages/peer-a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -317,6 +324,7 @@ flowchart TD "cwd": "/packages/prod-a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -357,6 +365,7 @@ flowchart TD "cwd": "/packages/prod-missing-task", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -397,6 +406,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..86e1336d2 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, + "remote_cache_cross_platform": false, "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..92511a1a0 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -146,6 +149,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -186,6 +190,7 @@ flowchart TD "cwd": "/packages/c", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..772df22b9 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, + "remote_cache_cross_platform": false, "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..6b51a5c4b 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, + "remote_cache_cross_platform": false, "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..1c0760f0f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -69,6 +70,7 @@ flowchart TD "cwd": "/apps/web", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -109,6 +111,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -149,6 +152,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -189,6 +193,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -229,6 +234,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -269,6 +275,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -309,6 +316,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml index 9d2f16b56..b44386d37 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml @@ -35,6 +35,16 @@ env = { "VP_REMOTE_CACHE" = "read-write" } name = "synthetic_local_only" args = ["run", "synthetic"] +# `cache.remote.crossPlatform` shares the task's remote entries between +# platforms. A built-in tool keeps the declaration of the task that runs it. +[[plan]] +name = "cross_platform" +args = ["run", "cross-platform"] + +[[plan]] +name = "synthetic_cross_platform" +args = ["run", "synthetic-cross-platform"] + [[plan]] name = "empty_env_endpoint_uses_config" args = ["run", "build"] diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc index 9aba7e0fc..cbcf83f9d 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc @@ -26,7 +26,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc index 503e9501f..b3708c1df 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc @@ -29,7 +29,8 @@ "url": "https://other.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc new file mode 100644 index 000000000..a32b0051d --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc @@ -0,0 +1,44 @@ +// run cross-platform +{ + "graph": [ + { + "key": [ + "/", + "cross-platform" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test", + "auth": { + "kind": "anonymous" + }, + "cross_platform": true + } + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] +} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc index 9d5bbc8ff..ef03f1081 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc @@ -26,7 +26,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc index 129a07ffe..83b77189f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc @@ -26,7 +26,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc index 1f54c163e..2452d7f95 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc @@ -29,7 +29,8 @@ "request_url": "https://token.example/idtoken?api-version=2.0", "request_token": "", "audience": "https://cache.example/projects/test" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc index 9d5bbc8ff..ef03f1081 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc @@ -26,7 +26,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc index ed2a3d6a2..e079f229b 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc @@ -37,7 +37,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc index d17a6b462..b3adf3b01 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc @@ -29,7 +29,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc index e04f8d187..7d4ccaaa4 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc @@ -37,7 +37,8 @@ "url": "https://other.example/projects/nested", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { @@ -85,7 +86,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc index 0ec2ee663..c88ffa2ce 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc @@ -79,7 +79,8 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc new file mode 100644 index 000000000..58b57dce2 --- /dev/null +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc @@ -0,0 +1,44 @@ +// run synthetic-cross-platform +{ + "graph": [ + { + "key": [ + "/", + "synthetic-cross-platform" + ], + "node": { + "items": [ + { + "kind": { + "Leaf": { + "Spawn": { + "cache_metadata": { + "spawn_fingerprint": { + "env_fingerprints": { + "fingerprinted_envs": {}, + "untracked_env_config": [ + "" + ] + } + }, + "remote_cache": { + "access": "read", + "url": "https://cache.example/projects/test", + "auth": { + "kind": "anonymous" + }, + "cross_platform": true + } + }, + "spawn_command": { + "spawn_envs": {} + } + } + } + } + } + ] + } + } + ] +} 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..cebba4b52 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 @@ -4,14 +4,16 @@ flowchart TD task_0["/#build"] task_1["/#cli-read"] - task_2["/#endpoints"] - task_3["/#env-off"] - task_4["/#inherit"] - task_5["/#local-only"] - task_6["/#prefix"] - task_7["/#siblings"] - task_8["/#synthetic"] - task_9["/#tracked-controls"] + task_2["/#cross-platform"] + task_3["/#endpoints"] + task_4["/#env-off"] + task_5["/#inherit"] + task_6["/#local-only"] + task_7["/#prefix"] + task_8["/#siblings"] + task_9["/#synthetic"] + task_10["/#synthetic-cross-platform"] + task_11["/#tracked-controls"] ``` ## `/#build` @@ -31,6 +33,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -71,6 +74,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -94,6 +98,47 @@ flowchart TD } ``` +## `/#cross-platform` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "cross-platform", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vtt print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "remote_cache_cross_platform": true, + "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" +} +``` + ## `/#endpoints` ```json @@ -111,6 +156,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -151,6 +197,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -191,6 +238,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -231,6 +279,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -271,6 +320,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -311,6 +361,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -351,6 +402,48 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, + "remote_cache_cross_platform": 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" +} +``` + +## `/#synthetic-cross-platform` + +```json +{ + "task_display": { + "package_name": "@test/remote-cache-config", + "task_name": "synthetic-cross-platform", + "package_path": "/" + }, + "resolved_config": { + "commands": [ + "vt tool print-file package.json" + ], + "resolved_options": { + "cwd": "/", + "cache_config": { + "remote_cache_allowed": true, + "remote_cache_cross_platform": true, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -391,6 +484,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [ "VP_REMOTE_CACHE", diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json index 150a0c9d8..487c73d55 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json @@ -18,6 +18,14 @@ "command": "vt tool print-file package.json", "cache": { "remote": false } }, + "cross-platform": { + "command": "vtt print-file package.json", + "cache": { "remote": { "crossPlatform": true } } + }, + "synthetic-cross-platform": { + "command": "vt tool print-file package.json", + "cache": { "remote": { "crossPlatform": true } } + }, "tracked-controls": { "command": "vtt print-file package.json", "cache": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc index 7a887eecd..5021129e5 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc @@ -18,7 +18,8 @@ "url": "cache.example/projects/test", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } } } diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc index e98507030..8bc5be28f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc @@ -29,7 +29,8 @@ "url": "https://cache.example/projects/inner", "auth": { "kind": "anonymous" - } + }, + "cross_platform": false } } } 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..f93e60e0f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..c243117cb 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,6 +109,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -147,6 +150,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -187,6 +191,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -227,6 +232,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..86a1ed61f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..6b73dacb5 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..818c099d7 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..1d32626d8 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..d269f5219 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -68,6 +69,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -130,6 +132,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -170,6 +173,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -211,6 +215,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..c9cec2514 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..4ae612436 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -73,6 +74,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -114,6 +116,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -155,6 +158,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -196,6 +200,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -238,6 +243,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -278,6 +284,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..07963852f 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -70,6 +71,7 @@ flowchart TD "cwd": "/packages/a#b%c", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -110,6 +112,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -150,6 +153,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -190,6 +194,7 @@ flowchart TD "cwd": "/packages/web/infra", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -230,6 +235,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..09c03f17d 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/middle", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/packages/top", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..7763b6e55 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..20c06b2de 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..616b4da8c 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..c32ec4771 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,6 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,6 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -146,6 +149,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..dd94d5d85 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..d2cf7aace 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,6 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -105,6 +107,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -145,6 +148,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..c098e15f7 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -63,6 +64,7 @@ flowchart TD "cwd": "/packages/pkg-a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "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..7d57eddad 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,6 +65,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -104,6 +106,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ From 54c81c813bd926414d48b03d02db15bd7a70e565 Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Fri, 20 Nov 2026 22:50:09 +0800 Subject: [PATCH 2/4] test(cache): add the cross-platform field to the Windows-only plan snapshots Co-Authored-By: Claude Opus 5.5 --- .../fixtures/env_name_overrides_windows/snapshots/task_graph.md | 2 ++ .../fixtures/windows_cmd_shim_rewrite/snapshots/task_graph.md | 1 + 2 files changed, 3 insertions(+) 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..432fe0d91 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [ "foo", @@ -67,6 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ 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..110e4f756 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, + "remote_cache_cross_platform": false, "env_config": { "fingerprinted_envs": [], "untracked_env": [ From 99c933df18f911ae92719e89c2dd3ab5ca9408b3 Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Sat, 21 Nov 2026 00:22:30 +0800 Subject: [PATCH 3/4] docs(cache): say that cross-platform keys still name the resolved program The key names a program outside the workspace by its file name and a program inside it by its workspace path. 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 even with `crossPlatform`. Co-Authored-By: Claude Opus 5.5 --- crates/vt/src/session/cache/remote.rs | 13 ++++++++----- crates/vt_graph/src/config/user.rs | 6 ++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/crates/vt/src/session/cache/remote.rs b/crates/vt/src/session/cache/remote.rs index cbe8ef844..e88b285f7 100644 --- a/crates/vt/src/session/cache/remote.rs +++ b/crates/vt/src/session/cache/remote.rs @@ -12,8 +12,9 @@ //! 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. A task that sets -//! `cache.remote.crossPlatform` shares its entries between platforms instead: -//! its header has an empty OS and architecture (see [`KeyPlatform`]). +//! `cache.remote.crossPlatform` shares its entries between platforms whose +//! keys otherwise match: its header has an empty OS and architecture (see +//! [`KeyPlatform`]). use std::{ fs::File, @@ -540,9 +541,11 @@ pub(super) enum KeyPlatform { /// This build's OS and architecture, so only builds for the same target /// share the entries. Current, - /// An empty OS and architecture, so builds for every target share the - /// entries. No target has an empty name, so these keys never equal a - /// [`Self::Current`] key. + /// An empty OS and architecture, so the header doesn't keep builds for + /// different targets apart. No target has an empty name, so these keys + /// never equal a [`Self::Current`] key. The rest of the key must still + /// match. It names the resolved program, such as `node.exe` on Windows + /// and `node` elsewhere, so Windows entries don't match other platforms'. Any, } diff --git a/crates/vt_graph/src/config/user.rs b/crates/vt_graph/src/config/user.rs index a34ec37b1..9cb1b2c7e 100644 --- a/crates/vt_graph/src/config/user.rs +++ b/crates/vt_graph/src/config/user.rs @@ -314,6 +314,12 @@ pub struct EnabledTaskRemoteCacheConfig { /// outputs depend on the platform 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 setting doesn't change the local cache. Changing it changes the task's remote /// keys, so the task misses the remote cache once. pub cross_platform: Option, From df7c102e76a8d6a6a52cd9e3af07272e49b1f281 Mon Sep 17 00:00:00 2001 From: "MK (fengmk2)" Date: Sat, 21 Nov 2026 16:47:33 +0800 Subject: [PATCH 4/4] feat(cache): declare the platform a task depends on with `cache.platform` Replace `cache.remote.crossPlatform` with `cache.platform`, a list of the parts of the platform (`"os"`, `"arch"`) that a task's outputs depend on. The workspace root's `cache.platform` is the default for every task and cached script that doesn't set its own, so package.json scripts can share entries too. The default is `["os", "arch"]`, so keys don't change unless a task or the workspace opts in. A part that isn't listed is empty in the remote key header. A built-in tool's `platform` adds to the task's, so a tool can't remove a part that the task lists. A task's `cache.remote` goes back to a boolean. Co-Authored-By: Claude Opus 5.5 --- crates/vt/src/session/cache/mod.rs | 51 ++-- crates/vt/src/session/cache/remote.rs | 166 ++++++------- crates/vt_bin/src/lib.rs | 1 + .../fixtures/remote_cache/snapshots.toml | 16 +- ...ss_platform.md => platform_independent.md} | 6 +- .../fixtures/remote_cache/vite-task.json | 2 +- crates/vt_graph/src/config/mod.rs | 50 +++- crates/vt_graph/src/config/user.rs | 181 +++++++------- crates/vt_plan/src/cache_metadata.rs | 14 +- crates/vt_plan/src/plan.rs | 144 +++++------ crates/vt_plan/src/remote_cache.rs | 11 - ...ery_tool_synthetic_task_in_user_task.jsonc | 4 + .../additional_env/snapshots/task_graph.md | 4 +- ...query___cache_enables_script_caching.jsonc | 4 + ...ching_even_when_cache_tasks_is_false.jsonc | 4 + ..._per_task_cache_true_enables_caching.jsonc | 4 + .../snapshots/task_graph.md | 8 +- .../snapshots/task_graph.md | 8 +- .../cache_keys/snapshots/task_graph.md | 8 +- .../fixtures/cache_platform/package.json | 6 + .../fixtures/cache_platform/snapshots.toml | 27 +++ ...query_script_uses_workspace_platform.jsonc | 29 +++ .../snapshots/query_task_depends_on_os.jsonc | 29 +++ .../query_task_shares_between_platforms.jsonc | 29 +++ .../query_task_uses_workspace_platform.jsonc | 29 +++ .../query_tool_keeps_task_platform.jsonc | 29 +++ .../cache_platform/snapshots/task_graph.md | 225 ++++++++++++++++++ .../fixtures/cache_platform/vite-task.json | 21 ++ .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 4 +- ...query_another_task_cached_by_default.jsonc | 4 + .../query_task_cached_by_default.jsonc | 4 + .../snapshots/task_graph.md | 6 +- .../cache_sharing/snapshots/task_graph.md | 6 +- .../cache_subcommand/snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 6 +- ...script_cached_when_global_cache_true.jsonc | 4 + ...y_task_cached_when_global_cache_true.jsonc | 4 + .../snapshots/task_graph.md | 4 +- ..._should_put_synthetic_task_under_cwd.jsonc | 4 + ..._should_not_affect_expanded_task_cwd.jsonc | 4 + .../cd_in_scripts/snapshots/task_graph.md | 6 +- .../snapshots/task_graph.md | 46 ++-- .../conflict_test/snapshots/task_graph.md | 6 +- .../cycle_dependency/snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 16 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 20 +- ...extra_args_only_reach_requested_task.jsonc | 8 + .../snapshots/task_graph.md | 4 +- .../filter_workspace/snapshots/task_graph.md | 26 +- .../snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 2 +- ...d___cache_enables_inner_task_caching.jsonc | 4 + ...opagates_to_nested_run_without_flags.jsonc | 4 + ...es_not_propagate_into_nested___cache.jsonc | 4 + .../snapshots/task_graph.md | 8 +- .../nested_tasks/snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 8 +- .../snapshots/task_graph.md | 6 +- .../snapshots/task_graph.md | 20 +- .../snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 10 +- .../snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 16 +- .../remote_cache_config/snapshots.toml | 10 - .../query_cli_overrides_invalid_env.jsonc | 3 +- .../query_controls_in_env_fingerprinted.jsonc | 3 +- .../snapshots/query_cross_platform.jsonc | 44 ---- .../snapshots/query_default_read.jsonc | 3 +- ...query_empty_env_endpoint_uses_config.jsonc | 3 +- .../snapshots/query_github_oidc_auth.jsonc | 3 +- ...github_oidc_auth_needs_request_token.jsonc | 3 +- .../query_nested_cli_overrides_env.jsonc | 3 +- .../query_prefix_controls_fingerprinted.jsonc | 3 +- .../query_sibling_endpoint_isolation.jsonc | 6 +- .../query_sibling_mode_isolation.jsonc | 3 +- .../query_synthetic_cross_platform.jsonc | 44 ---- .../snapshots/task_graph.md | 120 ++-------- .../remote_cache_config/vite-task.json | 8 - .../query_endpoint_not_validated.jsonc | 3 +- .../query_nested_endpoint_enables_read.jsonc | 3 +- .../snapshots/task_graph.md | 4 +- .../script_hooks/snapshots/task_graph.md | 12 +- .../snapshots/task_graph.md | 6 +- .../snapshots/task_graph.md | 8 +- .../snapshots/task_graph.md | 4 +- ...uery_shell_fallback_for_pipe_command.jsonc | 4 + .../shell_fallback/snapshots/task_graph.md | 2 +- ...does_not_affect_expanded_query_tasks.jsonc | 4 + ..._not_affect_expanded_synthetic_cache.jsonc | 4 + ..._untrackedEnv_inherited_by_synthetic.jsonc | 4 + ...h_cache_true_enables_synthetic_cache.jsonc | 4 + .../snapshots/task_graph.md | 10 +- .../query_synthetic_in_subpackage.jsonc | 4 + .../snapshots/task_graph.md | 4 +- .../snapshots/query_array_cd.jsonc | 12 + .../snapshots/query_array_shorthand.jsonc | 12 + .../query_array_unbalanced_quotes.jsonc | 8 + .../snapshots/query_array_with_and.jsonc | 12 + .../snapshots/query_nested_vt_array.jsonc | 8 + .../query_object_array_depends_on.jsonc | 16 ++ .../snapshots/query_string_shorthand.jsonc | 4 + .../snapshots/task_graph.md | 14 +- .../task_graph_json/snapshots/task_graph.md | 12 +- .../snapshots/task_graph.md | 6 +- .../vpr_shorthand/snapshots/task_graph.md | 4 +- .../query_dev_filter_from_root.jsonc | 4 + .../snapshots/query_dev_in_subpackage.jsonc | 4 + .../snapshots/task_graph.md | 2 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 8 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 8 +- .../snapshots/task_graph.md | 4 +- .../snapshots/task_graph.md | 6 +- 121 files changed, 1146 insertions(+), 761 deletions(-) rename crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/{cross_platform.md => platform_independent.md} (86%) create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/package.json create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots.toml create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_script_uses_workspace_platform.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_depends_on_os.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_shares_between_platforms.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_task_uses_workspace_platform.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/query_tool_keeps_task_platform.jsonc create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/snapshots/task_graph.md create mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/cache_platform/vite-task.json delete mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc delete mode 100644 crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc diff --git a/crates/vt/src/session/cache/mod.rs b/crates/vt/src/session/cache/mod.rs index e1c13bf2d..f0e596c02 100644 --- a/crates/vt/src/session/cache/mod.rs +++ b/crates/vt/src/session/cache/mod.rs @@ -29,7 +29,7 @@ use vt_graph::config::ResolvedGlobConfig; use vt_path::{AbsolutePath, AbsolutePathBuf, RelativePathBuf}; use vt_plan::{ cache_metadata::{CacheMetadata, ExecutionCacheKey, SpawnFingerprint}, - remote_cache::{ExecutionRemoteCache, RemoteCacheAccess, ResolvedRemoteCacheConfig}, + remote_cache::{RemoteCacheAccess, ResolvedRemoteCacheConfig}, }; use vt_remote_cache::Fetched; use vt_str::Str; @@ -39,7 +39,7 @@ use wincode::{ error::{ReadResult, WriteResult}, }; -use self::remote::{KeyPlatform, ReadError, RemoteClients, RemoteUploads, Restore, UploadError}; +use self::remote::{ReadError, RemoteClients, RemoteUploads, Restore, UploadError}; use super::{ event::RunKind, execute::{ @@ -676,23 +676,19 @@ impl ExecutionCache { clippy::manual_let_else, reason = "naming every access mode makes adding one a compile error here" )] - let remote_cache = match &cache_metadata.remote_cache { + let remote_config = match &cache_metadata.remote_cache { Some( - remote_cache @ ExecutionRemoteCache { - config: - ResolvedRemoteCacheConfig { - access: RemoteCacheAccess::Read | RemoteCacheAccess::ReadWrite, - .. - }, + remote_config @ ResolvedRemoteCacheConfig { + access: RemoteCacheAccess::Read | RemoteCacheAccess::ReadWrite, .. }, - ) => remote_cache, + ) => remote_config, None => return Ok(Some(Err(local_miss))), }; let start = Instant::now(); let remote_lookup = self .try_hit_remote( - remote_cache, + remote_config, cache_metadata, &cache_key, &validation, @@ -786,7 +782,7 @@ impl ExecutionCache { Ok(Some(Err(CacheMiss::NotFound))) } - /// Fetch the entry from `remote_cache`. + /// Fetch the entry from the remote cache that `remote_config` configures. /// An exact entry that passes validation is a hit once its output archive /// is downloaded, or right away in a dry run. /// A fallback entry, a failed validation, or a failed read is a miss. An @@ -796,7 +792,7 @@ impl ExecutionCache { #[expect(clippy::too_many_arguments, reason = "forwarded from `try_hit`")] async fn try_hit_remote( &self, - remote_cache: &ExecutionRemoteCache, + remote_config: &ResolvedRemoteCacheConfig, cache_metadata: &CacheMetadata, cache_key: &CacheEntryKey, validation: &Validation, @@ -807,7 +803,13 @@ impl ExecutionCache { let start = Instant::now(); let fetched = self .remote_clients - .fetch(remote_cache, 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()), @@ -824,7 +826,7 @@ impl ExecutionCache { ); let (cache_key, validation, dir) = (cache_key.clone(), validation.clone(), self.dir.clone()); - let platform = KeyPlatform::of(remote_cache); + let platform = cache_metadata.platform; let check = move || { remote::resolve( fetched, @@ -863,7 +865,7 @@ impl ExecutionCache { Some(blob_id) => { match self .remote_clients - .download_archive(&remote_cache.config, &blob_id, cache_dir, cancel_token) + .download_archive(remote_config, &blob_id, cache_dir, cancel_token) .await { Ok(archive_name) => Some(archive_name), @@ -1001,23 +1003,20 @@ impl ExecutionCache { tracing::debug!(elapsed = ?start.elapsed(), "recorded the cache entry locally"); let upload_error = Arc::new(OnceLock::new()); - let remote_cache = match &cache_metadata.remote_cache { + let remote_config = match &cache_metadata.remote_cache { Some( - remote_cache @ ExecutionRemoteCache { - config: ResolvedRemoteCacheConfig { access: RemoteCacheAccess::ReadWrite, .. }, + remote_config @ ResolvedRemoteCacheConfig { + access: RemoteCacheAccess::ReadWrite, .. }, - ) => remote_cache, - Some(ExecutionRemoteCache { - config: ResolvedRemoteCacheConfig { access: RemoteCacheAccess::Read, .. }, - .. - }) - | None => { + ) => remote_config, + Some(ResolvedRemoteCacheConfig { access: RemoteCacheAccess::Read, .. }) | None => { return Ok(upload_error); } }; match self.remote_clients.prepare_upload( - remote_cache, + 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 e88b285f7..c43305022 100644 --- a/crates/vt/src/session/cache/remote.rs +++ b/crates/vt/src/session/cache/remote.rs @@ -11,10 +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. A task that sets -//! `cache.remote.crossPlatform` shares its entries between platforms whose -//! keys otherwise match: its header has an empty OS and architecture (see -//! [`KeyPlatform`]). +//! 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, @@ -28,10 +30,11 @@ 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, - remote_cache::{ExecutionRemoteCache, RemoteCacheAuth, ResolvedRemoteCacheConfig}, + remote_cache::{RemoteCacheAuth, ResolvedRemoteCacheConfig}, }; use vt_remote_cache::{ Client, Download, Entry, Fetched, @@ -134,7 +137,7 @@ pub(super) struct Restore { /// failed fetch is a read failure. pub(super) fn resolve( fetched: Result, ReadError>, - platform: KeyPlatform, + platform: CachePlatform, cache_key: &CacheEntryKey, mut validate: impl FnMut(&CacheEntryValue) -> anyhow::Result, mut describe: impl FnMut(&CacheEntryValue) -> Option>, @@ -224,18 +227,20 @@ impl RemoteClients { Ok(client) } - /// Fetch the entries stored under `cache_key` in `remote_cache`, falling - /// back to the key last stored for `execution_cache_key`. Returns `None` - /// if neither key matched. Stops when `cancel_token` is cancelled. + /// 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`. 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_cache: &ExecutionRemoteCache, + remote_config: &ResolvedRemoteCacheConfig, + platform: CachePlatform, cache_key: &CacheEntryKey, execution_cache_key: &ExecutionCacheKey, cancel_token: &CancellationToken, ) -> Result, ReadError> { - let client = self.client(&remote_cache.config).map_err(ReadError::Fetch)?; - let platform = KeyPlatform::of(remote_cache); + let client = self.client(remote_config).map_err(ReadError::Fetch)?; let key = encode_key(platform, cache_key)?; let secondary_key = encode_key(platform, execution_cache_key)?; cancel_token @@ -281,22 +286,23 @@ impl RemoteClients { } /// Prepare to upload an entry that was just recorded locally, along with - /// its output archive in `cache_dir`, to `remote_cache`: get its client - /// and encode the entry. Nothing is sent until the returned future is + /// its output archive in `cache_dir`, to the remote cache that + /// `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_cache: &ExecutionRemoteCache, + remote_config: &ResolvedRemoteCacheConfig, + platform: CachePlatform, cache_key: &CacheEntryKey, execution_cache_key: &ExecutionCacheKey, cache_value: &CacheEntryValue, cache_dir: &AbsolutePath, ) -> Result> + Send + use<>, UploadError> { let start = Instant::now(); - let client = self.client(&remote_cache.config)?; - let platform = KeyPlatform::of(remote_cache); + let client = self.client(remote_config)?; let key = encode_key(platform, cache_key)?; let secondary_key = encode_key(platform, execution_cache_key)?; let value = encode_value(cache_value)?; @@ -534,50 +540,21 @@ struct KeyHeader { arch: Str, } -/// The OS and architecture in a task's key header, which decide the -/// platforms that share its remote entries. -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub(super) enum KeyPlatform { - /// This build's OS and architecture, so only builds for the same target - /// share the entries. - Current, - /// An empty OS and architecture, so the header doesn't keep builds for - /// different targets apart. No target has an empty name, so these keys - /// never equal a [`Self::Current`] key. The rest of the key must still - /// match. It names the resolved program, such as `node.exe` on Windows - /// and `node` elsewhere, so Windows entries don't match other platforms'. - Any, -} - -impl KeyPlatform { - /// The key platform of a task that uses `remote_cache`. - pub(super) const fn of(remote_cache: &ExecutionRemoteCache) -> Self { - if remote_cache.cross_platform { Self::Any } else { Self::Current } - } - - /// The OS and architecture that the key header names. - const fn os_and_arch(self) -> (&'static str, &'static str) { - match self { - Self::Current => (std::env::consts::OS, std::env::consts::ARCH), - Self::Any => ("", ""), - } - } -} - -/// The key header for this build and `platform`. -fn encode_header(platform: KeyPlatform) -> WriteResult> { - let (os, arch) = platform.os_and_arch(); +/// 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(os), - arch: Str::from(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 and `platform`. fn encode_key>( - platform: KeyPlatform, + platform: CachePlatform, key: &K, ) -> WriteResult> { let mut bytes = encode_header(platform)?; @@ -586,7 +563,7 @@ fn encode_key>( } /// Decode a key stored with the header for this build and `platform`. -fn decode_key(platform: KeyPlatform, bytes: &[u8]) -> Result { +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))) @@ -731,8 +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, KeyPlatform::Current, &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 @@ -746,7 +722,7 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let restore = resolve( Ok(Some(exact(&cache_value()))), - KeyPlatform::Current, + CachePlatform::ALL, &key, validate_against(BTreeMap::new()), no_baseline, @@ -762,7 +738,7 @@ mod tests { let current_inputs = BTreeMap::from([(RelativePathBuf::new("src/a.txt").unwrap(), 1)]); let miss = resolve( Ok(Some(exact(&cache_value()))), - KeyPlatform::Current, + CachePlatform::ALL, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(current_inputs), no_baseline, @@ -784,7 +760,7 @@ mod tests { let entries = vec![entry(&cache_value(), "2"), entry(&cache_value(), "1")]; let restore = resolve( Ok(Some(Fetched::Exact { entries })), - KeyPlatform::Current, + CachePlatform::ALL, &key, validate_against(BTreeMap::new()), no_baseline, @@ -806,7 +782,7 @@ mod tests { let mut validate = validate_against(inputs(&["src/a.txt"])); let restore = resolve( Ok(Some(Fetched::Exact { entries })), - KeyPlatform::Current, + CachePlatform::ALL, &key, |value| { validated += 1; @@ -827,7 +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 })), - KeyPlatform::Current, + CachePlatform::ALL, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -841,7 +817,7 @@ mod tests { ]; let miss = resolve( Ok(Some(Fetched::Exact { entries })), - KeyPlatform::Current, + CachePlatform::ALL, &key, validate_against(inputs(&["src/a.txt"])), no_baseline, @@ -860,7 +836,7 @@ mod tests { .insert(TrackedEnvQuery::Glob(Str::from("PROBE_[")), BTreeMap::new()); let miss = resolve( Ok(Some(exact(&value))), - KeyPlatform::Current, + CachePlatform::ALL, &cache_key(ResolvedGlobConfig::default_auto()), validate_against(BTreeMap::new()), no_baseline, @@ -872,13 +848,12 @@ mod tests { #[test] fn fallback_is_a_mismatch_with_the_stored_key() { let stored_key = - encode_key(KeyPlatform::Current, &cache_key(ResolvedGlobConfig::default_auto())) - .unwrap(); + 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 })), - KeyPlatform::Current, + CachePlatform::ALL, &cache_key(input_config), not_validated, no_baseline, @@ -901,7 +876,7 @@ mod tests { fn no_match_is_a_miss_without_an_entry() { let key = cache_key(ResolvedGlobConfig::default_auto()); let miss = - resolve(Ok(None), KeyPlatform::Current, &key, not_validated, no_baseline).unwrap_err(); + resolve(Ok(None), CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert!(matches!(miss, CacheMiss::NotFound), "{miss:?}"); } @@ -910,7 +885,7 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let fetched = Err(ReadError::Fetch(vt_remote_cache::Error::InvalidEndpoint(None))); let miss = - resolve(fetched, KeyPlatform::Current, &key, not_validated, no_baseline).unwrap_err(); + resolve(fetched, CachePlatform::ALL, &key, not_validated, no_baseline).unwrap_err(); assert_eq!(read_failure(miss), "remote cache fetch failed"); } @@ -977,8 +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, KeyPlatform::Current, &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"); } } @@ -999,16 +974,19 @@ 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(KeyPlatform::Current).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, KeyPlatform::Current, &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 { @@ -1021,18 +999,19 @@ mod tests { } #[test] - fn keys_name_the_platform_unless_cross_platform() { + fn keys_name_only_the_listed_parts_of_the_platform() { let key = cache_key(ResolvedGlobConfig::default_auto()); let encoded = serialize_cache(&key).unwrap(); - let current = encode_key(KeyPlatform::Current, &key).unwrap(); - assert_eq!( - current, - [header_for(std::env::consts::OS, std::env::consts::ARCH), encoded.clone()].concat() - ); - // The header names no target, so every platform encodes the same key. - let any = encode_key(KeyPlatform::Any, &key).unwrap(); - assert_eq!(any, [header_for("", ""), encoded].concat()); - assert_ne!(current, any); + 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] @@ -1042,9 +1021,9 @@ mod tests { input_config.positive_globs.insert(Str::from("src/**")); let key = cache_key(input_config); for (stored_platform, platform, decodes) in [ - (KeyPlatform::Any, KeyPlatform::Any, true), - (KeyPlatform::Current, KeyPlatform::Any, false), - (KeyPlatform::Any, KeyPlatform::Current, false), + (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() })); @@ -1124,9 +1103,9 @@ mod tests { let key = cache_key(ResolvedGlobConfig::default_auto()); let execution_key = ExecutionCacheKey::ExecAPI(Arc::from([])); - let remote_cache = ExecutionRemoteCache { config: remote_config, cross_platform: false }; let clients = RemoteClients::default(); - let fetch = clients.fetch(&remote_cache, &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(); @@ -1169,9 +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(); - let remote_cache = - ExecutionRemoteCache { config: remote_config.clone(), cross_platform: false }; - clients.prepare_upload(&remote_cache, &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 c9c2e730d..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,12 +290,12 @@ steps = [ ], ] -# `generate` sets `cache.remote.crossPlatform`, 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. +# `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 = "cross_platform" +name = "platform_independent" cfg = 'not(target_env = "musl")' ignore = true steps = [ @@ -337,7 +337,7 @@ steps = [ "vt", "run", "generate", - ], comment = "The entry stored under the cross-platform keys is a remote hit." }, + ], comment = "The entry stored under the keys that name no platform is a remote hit." }, { argv = [ "vtt", "print-file", @@ -347,8 +347,8 @@ steps = [ "vtt", "replace-file-content", "vite-task.json", - '"crossPlatform": true', - '"crossPlatform": false', + '"platform": []', + '"platform": ["os", "arch"]', ], { argv = [ "remote-cache-server", diff --git a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md similarity index 86% rename from crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md rename to crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md index 475910e90..5ad7c737f 100644 --- a/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/cross_platform.md +++ b/crates/vt_bin/tests/e2e_snapshots/fixtures/remote_cache/snapshots/platform_independent.md @@ -1,4 +1,4 @@ -# cross_platform +# platform_independent ## `remote-cache-server start` @@ -26,7 +26,7 @@ $ vtt write-file dist/generated.txt generated ## `remote-cache-server run vt run generate` -The entry stored under the cross-platform keys is a remote hit. +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 @@ -45,7 +45,7 @@ The outputs are restored. generated ``` -## `vtt replace-file-content vite-task.json '"crossPlatform": true' '"crossPlatform": false'` +## `vtt replace-file-content vite-task.json '"platform": []' '"platform": ["os", "arch"]'` ``` ``` 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 984a79d1f..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 @@ -36,7 +36,7 @@ "cache": { "input": ["src/**"], "output": ["dist/**"], - "remote": { "crossPlatform": true } + "platform": [] } } } diff --git a/crates/vt_graph/src/config/mod.rs b/crates/vt_graph/src/config/mod.rs index 46fee7337..10c0cb5c3 100644 --- a/crates/vt_graph/src/config/mod.rs +++ b/crates/vt_graph/src/config/mod.rs @@ -6,11 +6,10 @@ use hashbrown::hash_map::EntryRef; use rustc_hash::{FxBuildHasher, FxHashSet}; use serde::Serialize; pub use user::{ - AutoTracking, Command, EnabledCacheConfig, EnabledTaskRemoteCacheConfig, GlobWithBase, - InputBase, ResolvedGlobalCacheConfig, UserCacheConfig, UserDependencyType, UserDependsOnEntry, + AutoTracking, Command, EnabledCacheConfig, GlobWithBase, InputBase, PlatformDimension, + ResolvedGlobalCacheConfig, UserCacheConfig, UserDependencyType, UserDependsOnEntry, UserDependsOnFrom, UserGlobalCacheConfig, UserInputEntry, UserInputsConfig, UserOutputEntry, UserPackageDependency, UserRunConfig, UserTaskConfig, UserTaskDefinition, - UserTaskRemoteCacheConfig, }; use vt_path::AbsolutePath; use vt_str::Str; @@ -86,11 +85,12 @@ impl ResolvedTaskOptions { glob_resolver, )?; - let remote = enabled_cache_config.remote.unwrap_or_default().into_enabled(); Some(CacheConfig { - remote_cache_allowed: remote.is_some(), - remote_cache_cross_platform: remote - .is_some_and(|remote| remote.cross_platform.unwrap_or(false)), + 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 @@ -112,14 +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, - /// Whether the task's `cache.remote.crossPlatform` shares its remote cache - /// entries between platforms. It's `false` when remote caching isn't allowed. - pub remote_cache_cross_platform: 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 9cb1b2c7e..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; @@ -243,11 +245,7 @@ pub struct EnabledCacheConfig { #[cfg_attr(all(test, not(clippy)), ts(inline))] pub output: Option>, - /// Whether and how this task uses the remote cache. - /// - /// - Omitted or `true`: the remote cache is used with default settings (same as `{}`) - /// - `false`: the remote cache isn't used - /// - Object: the remote cache is used with the given settings + /// Whether this task can use the remote cache. Defaults to `true`. /// /// The remote cache is used only when these also hold: /// - Caching isn't turned off by `--no-cache` or the workspace root's `cache` setting. @@ -257,62 +255,22 @@ pub struct EnabledCacheConfig { /// defaults to `read`, which downloads cached results without uploading new ones. // 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 value of a task's `cache.remote` field. -#[derive(Debug, PartialEq, Eq)] -pub enum UserTaskRemoteCacheConfig { - /// `true` uses the remote cache with default settings; `false` doesn't use it. - Bool(bool), - /// Uses the remote cache with the given settings. - Config(EnabledTaskRemoteCacheConfig), -} - -// Not `#[serde(untagged)]`, which replaces each variant's error with a generic one. -impl<'de> Deserialize<'de> for UserTaskRemoteCacheConfig { - fn deserialize>(deserializer: D) -> Result { - UntaggedEnumVisitor::new() - .expecting("a boolean or an object of remote cache settings") - .bool(|enabled| Ok(Self::Bool(enabled))) - .map(|map| map.deserialize().map(Self::Config)) - .deserialize(deserializer) - } -} - -impl Default for UserTaskRemoteCacheConfig { - /// The remote cache used with default settings, used when `cache.remote` is omitted. - fn default() -> Self { - Self::Bool(true) - } -} + pub remote: Option, -impl UserTaskRemoteCacheConfig { - /// Returns the remote cache settings, or `None` if the remote cache isn't used. - #[must_use] - pub fn into_enabled(self) -> Option { - match self { - Self::Bool(true) => Some(EnabledTaskRemoteCacheConfig::default()), - Self::Bool(false) => None, - Self::Config(config) => Some(config), - } - } -} - -/// A task's remote cache settings when it uses the remote cache. -#[derive(Debug, Default, Deserialize, PartialEq, Eq)] -#[serde(deny_unknown_fields, rename_all = "camelCase")] -pub struct EnabledTaskRemoteCacheConfig { - /// Whether the task's remote cache entries are shared between platforms. Defaults to - /// `false`. + /// 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 /// - /// Set it only on a task whose outputs are the same on every OS and architecture, such - /// as a code generator that runs on Node.js. Its remote entries then don't name an OS or - /// architecture, so 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 the platform in a way that the cache doesn't track, such as a check - /// of `process.platform`, another platform's outputs are restored. + /// 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 @@ -320,9 +278,21 @@ pub struct EnabledTaskRemoteCacheConfig { /// `node_modules/.bin` program to its `.cmd` shim, so Windows entries don't match Linux /// or macOS entries. /// - /// The setting doesn't change the local cache. Changing it changes the task's remote - /// keys, so the task misses the remote cache once. - pub cross_platform: Option, + /// 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. @@ -466,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>, }, } @@ -477,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), }, } } @@ -865,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(); @@ -876,35 +863,27 @@ mod tests { untracked_env: Some(std::iter::once("FOO".into()).collect()), input: Some(vec![UserInputEntry::Glob("src/**".into())]), output: Some(vec![UserOutputEntry::Glob("dist/**".into())]), - remote: Some(UserTaskRemoteCacheConfig::Bool(false)), + remote: Some(false), + platform: Some(vec![PlatformDimension::Os]), }) ); } #[test] - fn test_cache_remote_forms() { + fn test_cache_platform() { let cases = [ - (json!(true), Some(EnabledTaskRemoteCacheConfig::default())), - (json!(false), None), - (json!({}), Some(EnabledTaskRemoteCacheConfig::default())), - ( - json!({ "crossPlatform": true }), - Some(EnabledTaskRemoteCacheConfig { cross_platform: Some(true) }), - ), - ( - json!({ "crossPlatform": false }), - Some(EnabledTaskRemoteCacheConfig { cross_platform: Some(false) }), - ), + (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 (remote, expected) in cases { - let user_config_json = json!({ "command": "echo test", "cache": { "remote": remote } }); - let remote = task_cache_config(user_config_json).unwrap().remote.unwrap(); - assert_eq!(remote.into_enabled(), expected); + 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); } - assert_eq!( - UserTaskRemoteCacheConfig::default().into_enabled(), - Some(EnabledTaskRemoteCacheConfig::default()) - ); } #[test] @@ -1161,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); @@ -1195,20 +1189,15 @@ 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": { "remote": "yes" } }), - "invalid type: string \"yes\", expected a boolean or an object of remote cache \ - settings", - ), - ( - json!({ "command": "echo", "cache": { "remote": { "crossplatform": true } } }), - "unknown field `crossplatform`, expected `crossPlatform`", + 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 100df110c..5895d92c9 100644 --- a/crates/vt_plan/src/cache_metadata.rs +++ b/crates/vt_plan/src/cache_metadata.rs @@ -3,13 +3,13 @@ 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}; pub use crate::envs::EnvValueHash; -use crate::{envs::EnvFingerprints, remote_cache::ExecutionRemoteCache}; +use crate::{envs::EnvFingerprints, remote_cache::ResolvedRemoteCacheConfig}; /// Key to identify an execution across sessions. #[derive(Debug, SchemaWrite, SchemaRead, Serialize)] @@ -55,10 +55,14 @@ 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, - /// with the task's `cache.remote` settings, unless the task sets - /// `cache.remote: false`. `None` means local caching only. - pub remote_cache: Option, + /// unless the task sets `cache.remote: false`. `None` means local caching only. + pub remote_cache: Option, /// The unfiltered env context for runner-aware APIs. This is the planning /// context's envs before spawn-env filtering, including command prefix envs diff --git a/crates/vt_plan/src/plan.rs b/crates/vt_plan/src/plan.rs index 2339a9e1c..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}, }, @@ -40,7 +40,7 @@ use crate::{ CacheOverride, PlanOptions, PlanRequest, QueryPlanRequest, ScriptCommand, SyntheticPlanRequest, }, - remote_cache::{self, ExecutionRemoteCache, ResolvedRemoteCacheConfig}, + remote_cache::{self, ResolvedRemoteCacheConfig}, resolve_cache_with_override, }; @@ -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,8 +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 shares its remote entries -/// between platforms if either declares `crossPlatform`. +/// 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( @@ -496,14 +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; - let synthetic_remote = remote.unwrap_or_default().into_enabled(); - parent_config.remote_cache_allowed &= synthetic_remote.is_some(); - parent_config.remote_cache_cross_platform = parent_config.remote_cache_allowed - && (parent_config.remote_cache_cross_platform - || synthetic_remote - .is_some_and(|remote| remote.cross_platform.unwrap_or(false))); + 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 @@ -702,11 +712,12 @@ 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.map(|config| ExecutionRemoteCache { - config: config.clone(), - cross_platform: cache_config.remote_cache_cross_platform, - }) + resolved_remote_cache.cloned() } else { None }, @@ -971,8 +982,8 @@ mod tests { use rustc_hash::FxHashSet; use vt_graph::config::{ - CacheConfig, EnabledCacheConfig, EnabledTaskRemoteCacheConfig, EnvConfig, GlobResolver, - ResolvedGlobConfig, UserTaskRemoteCacheConfig, + CacheConfig, CachePlatform, EnabledCacheConfig, EnvConfig, GlobResolver, PlatformDimension, + ResolvedGlobConfig, user::{UserCacheConfig, UserInputEntry}, }; use vt_path::AbsolutePathBuf; @@ -997,7 +1008,7 @@ mod tests { fn parent_config(includes_auto: bool, positive_globs: &[&str]) -> CacheConfig { CacheConfig { remote_cache_allowed: true, - remote_cache_cross_platform: false, + platform: Some(CachePlatform::ALL), env_config: EnvConfig { fingerprinted_envs: FxHashSet::default(), untracked_env: FxHashSet::default(), @@ -1031,6 +1042,7 @@ mod tests { input: None, output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1055,6 +1067,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1079,6 +1092,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1109,6 +1123,7 @@ mod tests { ]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1137,6 +1152,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1163,6 +1179,7 @@ mod tests { input: Some(vec![UserInputEntry::Glob("config/**".into())]), output: None, remote: None, + platform: None, }), &pkg, &ws, @@ -1187,40 +1204,18 @@ mod tests { assert!(result.is_none()); } - #[test] - fn synthetic_disables_remote_cache_despite_parent() { - let (pkg, ws) = test_paths(); - let parent = parent_config(true, &["src/**"]); - let result = resolve_synthetic_cache_config( - ParentCacheConfig::Inherited(parent), - UserCacheConfig::with_config(EnabledCacheConfig { - env: None, - untracked_env: None, - input: None, - output: None, - remote: Some(UserTaskRemoteCacheConfig::Bool(false)), - }), - &pkg, - &ws, - &GlobResolver::default(), - ) - .unwrap() - .unwrap(); - assert!(!result.remote_cache_allowed); - } - - /// Resolve a synthetic task whose `cache.remote` is `synthetic_remote` - /// under a parent whose remote cache settings are the given ones. Returns - /// the result's `remote_cache_allowed` and `remote_cache_cross_platform`. - fn synthetic_remote_cache( - parent_allowed: bool, - parent_cross_platform: bool, - synthetic_remote: Option, - ) -> (bool, bool) { + /// 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 mut parent = parent_config(true, &["src/**"]); - parent.remote_cache_allowed = parent_allowed; - parent.remote_cache_cross_platform = parent_cross_platform; + parent.platform = Some(parent_platform); let result = resolve_synthetic_cache_config( ParentCacheConfig::Inherited(parent), UserCacheConfig::with_config(EnabledCacheConfig { @@ -1229,6 +1224,7 @@ mod tests { input: None, output: None, remote: synthetic_remote, + platform: synthetic_platform, }), &pkg, &ws, @@ -1236,27 +1232,34 @@ mod tests { ) .unwrap() .unwrap(); - (result.remote_cache_allowed, result.remote_cache_cross_platform) + (result.remote_cache_allowed, result.platform) } #[test] - fn synthetic_remote_cache_cross_platform() { - let cross_platform = || { - Some(UserTaskRemoteCacheConfig::Config(EnabledTaskRemoteCacheConfig { - cross_platform: Some(true), - })) - }; - // The parent's declaration is kept when the synthetic sets nothing. - assert_eq!(synthetic_remote_cache(true, true, None), (true, true)); - // The synthetic's declaration applies when the parent sets nothing. - assert_eq!(synthetic_remote_cache(true, false, cross_platform()), (true, true)); - assert_eq!(synthetic_remote_cache(true, false, None), (true, false)); - // A side that turns off the remote cache turns off sharing too. + 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_cache(true, true, Some(UserTaskRemoteCacheConfig::Bool(false))), - (false, false) + synthetic_remote_settings(CachePlatform::ALL, None, Some(vec![])), + (true, Some(CachePlatform::ALL)) ); - assert_eq!(synthetic_remote_cache(false, false, cross_platform()), (false, false)); } #[test] @@ -1271,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/src/remote_cache.rs b/crates/vt_plan/src/remote_cache.rs index d8e92fef4..26c9df37f 100644 --- a/crates/vt_plan/src/remote_cache.rs +++ b/crates/vt_plan/src/remote_cache.rs @@ -47,17 +47,6 @@ pub struct ResolvedRemoteCacheConfig { pub auth: RemoteCacheAuth, } -/// The remote cache that an execution uses: the one resolved for its `vp run` -/// level, with the task's own `cache.remote` settings. -#[derive(Debug, Clone, Serialize)] -pub struct ExecutionRemoteCache { - #[serde(flatten)] - pub config: ResolvedRemoteCacheConfig, - /// Whether the task's `cache.remote.crossPlatform` shares its entries - /// between platforms. Their remote keys then name no OS or architecture. - pub cross_platform: bool, -} - /// How requests to the remote cache authenticate. It holds everything needed /// to build the credentials, so nothing reads envs after planning. #[derive(Debug, Clone, PartialEq, Eq, Hash, Serialize)] 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 a7b3c5c17..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 5dc8d76b6..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,7 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,7 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -130,7 +130,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -171,7 +171,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 02ad16967..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,7 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -89,7 +89,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [ "MY_ENV" @@ -139,7 +139,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -180,7 +180,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 03cc741c9..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 d0d90a2dc..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 71a358a59..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 b790727ad..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 0cead37ea..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 7a8b573b4..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,7 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 45212acda..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 7d816ee8d..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,7 +46,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -87,7 +87,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 2f30a063a..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 dcd04124d..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,7 +44,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -85,7 +85,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -126,7 +126,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -167,7 +167,7 @@ flowchart TD "cwd": "/packages/api", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -208,7 +208,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -249,7 +249,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -290,7 +290,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -331,7 +331,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -372,7 +372,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -413,7 +413,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -454,7 +454,7 @@ flowchart TD "cwd": "/packages/config", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -495,7 +495,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -536,7 +536,7 @@ flowchart TD "cwd": "/packages/pkg#special", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -577,7 +577,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -618,7 +618,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -659,7 +659,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -700,7 +700,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -741,7 +741,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -782,7 +782,7 @@ flowchart TD "cwd": "/packages/tools", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -823,7 +823,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -864,7 +864,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -905,7 +905,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -946,7 +946,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 4e108f76a..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,7 +25,7 @@ flowchart TD "cwd": "/packages/scope-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/packages/scope-a-b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/packages/test-package", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 d5d7e6b77..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 edb8d552e..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,7 +24,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 ffa1bdc5d..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,7 +23,7 @@ flowchart TD "cwd": "/packages/pkg-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/pkg-b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 06220074f..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,7 +35,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -98,7 +98,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -139,7 +139,7 @@ flowchart TD "cwd": "/packages/another-empty", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -180,7 +180,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -221,7 +221,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -262,7 +262,7 @@ flowchart TD "cwd": "/packages/empty-name", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -303,7 +303,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -344,7 +344,7 @@ flowchart TD "cwd": "/packages/normal-package", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 432fe0d91..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [ "foo", @@ -68,7 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 432fe0d91..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [ "foo", @@ -68,7 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 948988478..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,7 +38,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -101,7 +101,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -142,7 +142,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -183,7 +183,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -224,7 +224,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -265,7 +265,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -306,7 +306,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -347,7 +347,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -388,7 +388,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -429,7 +429,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 1691a78a5..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 124e06a12..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,7 +34,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -75,7 +75,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -116,7 +116,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -157,7 +157,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -198,7 +198,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -239,7 +239,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -280,7 +280,7 @@ flowchart TD "cwd": "/packages/cli", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -321,7 +321,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -362,7 +362,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -403,7 +403,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -444,7 +444,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -485,7 +485,7 @@ flowchart TD "cwd": "/packages/lib", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -526,7 +526,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 10529f33a..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,7 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c80546a24..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,7 +22,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 b7e44c67f..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c53275a0c..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 a04c72763..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 127209445..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,7 +26,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,7 +67,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -108,7 +108,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 1ea75b53a..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,7 +37,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -78,7 +78,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -119,7 +119,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -160,7 +160,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -201,7 +201,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -242,7 +242,7 @@ flowchart TD "cwd": "/packages/dev-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -283,7 +283,7 @@ flowchart TD "cwd": "/packages/peer-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -324,7 +324,7 @@ flowchart TD "cwd": "/packages/prod-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -365,7 +365,7 @@ flowchart TD "cwd": "/packages/prod-missing-task", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -406,7 +406,7 @@ flowchart TD "cwd": "/packages/shared", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 86e1336d2..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,7 +22,7 @@ flowchart TD "cwd": "/packages/self-dep", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 92511a1a0..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,7 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,7 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -108,7 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -149,7 +149,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -190,7 +190,7 @@ flowchart TD "cwd": "/packages/c", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 772df22b9..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,7 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 6b51a5c4b..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,7 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 1c0760f0f..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,7 +29,7 @@ flowchart TD "cwd": "/apps/web", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -70,7 +70,7 @@ flowchart TD "cwd": "/apps/web", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -111,7 +111,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -152,7 +152,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -193,7 +193,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -234,7 +234,7 @@ flowchart TD "cwd": "/packages/core", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -275,7 +275,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -316,7 +316,7 @@ flowchart TD "cwd": "/packages/utils", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml index b44386d37..9d2f16b56 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots.toml @@ -35,16 +35,6 @@ env = { "VP_REMOTE_CACHE" = "read-write" } name = "synthetic_local_only" args = ["run", "synthetic"] -# `cache.remote.crossPlatform` shares the task's remote entries between -# platforms. A built-in tool keeps the declaration of the task that runs it. -[[plan]] -name = "cross_platform" -args = ["run", "cross-platform"] - -[[plan]] -name = "synthetic_cross_platform" -args = ["run", "synthetic-cross-platform"] - [[plan]] name = "empty_env_endpoint_uses_config" args = ["run", "build"] diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc index cbcf83f9d..9aba7e0fc 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cli_overrides_invalid_env.jsonc @@ -26,8 +26,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc index b3708c1df..503e9501f 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_controls_in_env_fingerprinted.jsonc @@ -29,8 +29,7 @@ "url": "https://other.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc deleted file mode 100644 index a32b0051d..000000000 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_cross_platform.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// run cross-platform -{ - "graph": [ - { - "key": [ - "/", - "cross-platform" - ], - "node": { - "items": [ - { - "kind": { - "Leaf": { - "Spawn": { - "cache_metadata": { - "spawn_fingerprint": { - "env_fingerprints": { - "fingerprinted_envs": {}, - "untracked_env_config": [ - "" - ] - } - }, - "remote_cache": { - "access": "read", - "url": "https://cache.example/projects/test", - "auth": { - "kind": "anonymous" - }, - "cross_platform": true - } - }, - "spawn_command": { - "spawn_envs": {} - } - } - } - } - } - ] - } - } - ] -} diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc index ef03f1081..9d5bbc8ff 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_default_read.jsonc @@ -26,8 +26,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc index 83b77189f..129a07ffe 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_empty_env_endpoint_uses_config.jsonc @@ -26,8 +26,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc index 2452d7f95..1f54c163e 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth.jsonc @@ -29,8 +29,7 @@ "request_url": "https://token.example/idtoken?api-version=2.0", "request_token": "", "audience": "https://cache.example/projects/test" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc index ef03f1081..9d5bbc8ff 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_github_oidc_auth_needs_request_token.jsonc @@ -26,8 +26,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc index e079f229b..ed2a3d6a2 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_nested_cli_overrides_env.jsonc @@ -37,8 +37,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc index b3adf3b01..d17a6b462 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_prefix_controls_fingerprinted.jsonc @@ -29,8 +29,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc index 7d4ccaaa4..e04f8d187 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_endpoint_isolation.jsonc @@ -37,8 +37,7 @@ "url": "https://other.example/projects/nested", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { @@ -86,8 +85,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc index c88ffa2ce..0ec2ee663 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_sibling_mode_isolation.jsonc @@ -79,8 +79,7 @@ "url": "https://cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } }, "spawn_command": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc deleted file mode 100644 index 58b57dce2..000000000 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/snapshots/query_synthetic_cross_platform.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// run synthetic-cross-platform -{ - "graph": [ - { - "key": [ - "/", - "synthetic-cross-platform" - ], - "node": { - "items": [ - { - "kind": { - "Leaf": { - "Spawn": { - "cache_metadata": { - "spawn_fingerprint": { - "env_fingerprints": { - "fingerprinted_envs": {}, - "untracked_env_config": [ - "" - ] - } - }, - "remote_cache": { - "access": "read", - "url": "https://cache.example/projects/test", - "auth": { - "kind": "anonymous" - }, - "cross_platform": true - } - }, - "spawn_command": { - "spawn_envs": {} - } - } - } - } - } - ] - } - } - ] -} 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 cebba4b52..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 @@ -4,16 +4,14 @@ flowchart TD task_0["/#build"] task_1["/#cli-read"] - task_2["/#cross-platform"] - task_3["/#endpoints"] - task_4["/#env-off"] - task_5["/#inherit"] - task_6["/#local-only"] - task_7["/#prefix"] - task_8["/#siblings"] - task_9["/#synthetic"] - task_10["/#synthetic-cross-platform"] - task_11["/#tracked-controls"] + task_2["/#endpoints"] + task_3["/#env-off"] + task_4["/#inherit"] + task_5["/#local-only"] + task_6["/#prefix"] + task_7["/#siblings"] + task_8["/#synthetic"] + task_9["/#tracked-controls"] ``` ## `/#build` @@ -33,7 +31,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -74,7 +72,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -98,47 +96,6 @@ flowchart TD } ``` -## `/#cross-platform` - -```json -{ - "task_display": { - "package_name": "@test/remote-cache-config", - "task_name": "cross-platform", - "package_path": "/" - }, - "resolved_config": { - "commands": [ - "vtt print-file package.json" - ], - "resolved_options": { - "cwd": "/", - "cache_config": { - "remote_cache_allowed": true, - "remote_cache_cross_platform": true, - "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" -} -``` - ## `/#endpoints` ```json @@ -156,7 +113,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -197,7 +154,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -238,7 +195,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -279,7 +236,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -320,7 +277,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -361,7 +318,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -402,48 +359,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": false, - "remote_cache_cross_platform": 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" -} -``` - -## `/#synthetic-cross-platform` - -```json -{ - "task_display": { - "package_name": "@test/remote-cache-config", - "task_name": "synthetic-cross-platform", - "package_path": "/" - }, - "resolved_config": { - "commands": [ - "vt tool print-file package.json" - ], - "resolved_options": { - "cwd": "/", - "cache_config": { - "remote_cache_allowed": true, - "remote_cache_cross_platform": true, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -484,7 +400,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [ "VP_REMOTE_CACHE", diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json index 487c73d55..150a0c9d8 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_config/vite-task.json @@ -18,14 +18,6 @@ "command": "vt tool print-file package.json", "cache": { "remote": false } }, - "cross-platform": { - "command": "vtt print-file package.json", - "cache": { "remote": { "crossPlatform": true } } - }, - "synthetic-cross-platform": { - "command": "vt tool print-file package.json", - "cache": { "remote": { "crossPlatform": true } } - }, "tracked-controls": { "command": "vtt print-file package.json", "cache": { diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc index 5021129e5..7a887eecd 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_endpoint_not_validated.jsonc @@ -18,8 +18,7 @@ "url": "cache.example/projects/test", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } } } diff --git a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc index 8bc5be28f..e98507030 100644 --- a/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc +++ b/crates/vt_plan/tests/plan_snapshots/fixtures/remote_cache_without_endpoint/snapshots/query_nested_endpoint_enables_read.jsonc @@ -29,8 +29,7 @@ "url": "https://cache.example/projects/inner", "auth": { "kind": "anonymous" - }, - "cross_platform": false + } } } } 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 f93e60e0f..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c243117cb..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,7 +27,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -68,7 +68,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -109,7 +109,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -150,7 +150,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -191,7 +191,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -232,7 +232,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 86a1ed61f..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 6b73dacb5..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 818c099d7..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 1d32626d8..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,7 +22,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 d269f5219..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,7 +28,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -69,7 +69,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -132,7 +132,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -173,7 +173,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -215,7 +215,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c9cec2514..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 4ae612436..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,7 +31,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -74,7 +74,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -116,7 +116,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -158,7 +158,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -200,7 +200,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -243,7 +243,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -284,7 +284,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 07963852f..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,7 +30,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -71,7 +71,7 @@ flowchart TD "cwd": "/packages/a#b%c", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -112,7 +112,7 @@ flowchart TD "cwd": "/packages/ui", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -153,7 +153,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -194,7 +194,7 @@ flowchart TD "cwd": "/packages/web/infra", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -235,7 +235,7 @@ flowchart TD "cwd": "/packages/web", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 09c03f17d..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,7 +24,7 @@ flowchart TD "cwd": "/packages/bottom", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/packages/middle", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/packages/top", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 7763b6e55..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 110e4f756..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,7 +22,7 @@ flowchart TD "cwd": "/packages/foo", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 20c06b2de..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/app", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 616b4da8c..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c32ec4771..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,7 +26,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -67,7 +67,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -108,7 +108,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -149,7 +149,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 dd94d5d85..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 d2cf7aace..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,7 +25,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -66,7 +66,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -107,7 +107,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -148,7 +148,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 c098e15f7..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,7 +23,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -64,7 +64,7 @@ flowchart TD "cwd": "/packages/pkg-a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "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 7d57eddad..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,7 +24,7 @@ flowchart TD "cwd": "/", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -65,7 +65,7 @@ flowchart TD "cwd": "/packages/a", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [ @@ -106,7 +106,7 @@ flowchart TD "cwd": "/packages/b", "cache_config": { "remote_cache_allowed": true, - "remote_cache_cross_platform": false, + "platform": null, "env_config": { "fingerprinted_envs": [], "untracked_env": [