Unverified Commit 00529cd3 authored by vercel-fleet-prod[bot]'s avatar vercel-fleet-prod[bot] Committed by GitHub

Fix stale versioned content paths

Co-authored-by: 's avatarWill Binns-Smith <755844+wbinnssmith@users.noreply.github.com>
parent 66170577
...@@ -4899,6 +4899,7 @@ dependencies = [ ...@@ -4899,6 +4899,7 @@ dependencies = [
"turbo-tasks-env", "turbo-tasks-env",
"turbo-tasks-fs", "turbo-tasks-fs",
"turbo-tasks-hash", "turbo-tasks-hash",
"turbo-tasks-testing",
"turbo-unix-path", "turbo-unix-path",
"turbopack", "turbopack",
"turbopack-analyze", "turbopack-analyze",
......
...@@ -56,6 +56,7 @@ urlencoding = { workspace = true } ...@@ -56,6 +56,7 @@ urlencoding = { workspace = true }
tokio = { workspace = true } tokio = { workspace = true }
tempfile = { workspace = true } tempfile = { workspace = true }
turbo-tasks-backend = { workspace = true } turbo-tasks-backend = { workspace = true }
turbo-tasks-testing = { workspace = true }
[build-dependencies] [build-dependencies]
anyhow = { workspace = true } anyhow = { workspace = true }
......
|name, initial| {
// `CARGO_TARGET_TMPDIR` is only set for integration-test targets, and this config is included by
// unit tests in the library test binary, so derive the cache directory from the temp dir instead.
let path = std::env::temp_dir().join(format!("next-api-{name}"));
if initial {
let _ = std::fs::remove_dir_all(&path);
}
std::fs::create_dir_all(&path).unwrap();
turbo_tasks::TurboTasks::new(
turbo_tasks_backend::TurboTasksBackend::new(
turbo_tasks_backend::BackendOptions {
num_workers: Some(2),
small_preallocation: true,
storage_mode: Some(turbo_tasks_backend::StorageMode::ReadWriteOnShutdown),
..Default::default()
},
turbo_tasks_backend::turbo_backing_storage(
path.as_path(),
&turbo_tasks_backend::GitVersionInfo {
describe: "test-unversioned",
dirty: false,
},
turbo_tasks_backend::BackingStorageOptions {
is_short_session: true,
..Default::default()
},
).unwrap().0
)
)
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment