Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move fs cache location. #8126

Merged
merged 6 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
24 changes: 6 additions & 18 deletions crates/turborepo-cache/src/async_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,12 +272,8 @@
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]);

// Confirm that fs cache file does *not* exist
assert!(!fs_cache_path.exists());
Expand Down Expand Up @@ -360,12 +356,8 @@
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache", &format!("{}.tar.zst", hash)]);

// Confirm that fs cache file exists
assert!(fs_cache_path.exists());
Expand Down Expand Up @@ -454,12 +446,8 @@
// Wait for async cache to process
async_cache.wait().await.unwrap();

let fs_cache_path = repo_root_path.join_components(&[
"node_modules",
".cache",
"turbo",
&format!("{}.tar.zst", hash),
]);
let fs_cache_path =
repo_root_path.join_components(&[".turbo", "cache" & format!("{}.tar.zst", hash)]);

Check failure on line 450 in crates/turborepo-cache/src/async_cache.rs

View workflow job for this annotation

GitHub Actions / Turborepo Rust testing on ubuntu

no implementation for `&str & std::string::String`

Check failure on line 450 in crates/turborepo-cache/src/async_cache.rs

View workflow job for this annotation

GitHub Actions / Turborepo Rust testing on macos

no implementation for `&str & std::string::String`

Check failure on line 450 in crates/turborepo-cache/src/async_cache.rs

View workflow job for this annotation

GitHub Actions / Turborepo Rust testing on windows

no implementation for `&str & std::string::String`
anthonyshew marked this conversation as resolved.
Show resolved Hide resolved

// Confirm that fs cache file exists
assert!(fs_cache_path.exists());
Expand Down
2 changes: 1 addition & 1 deletion crates/turborepo-cache/src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl FSCache {
if let Some(override_dir) = override_dir {
AbsoluteSystemPathBuf::from_unknown(repo_root, override_dir)
} else {
repo_root.join_components(&["node_modules", ".cache", "turbo"])
repo_root.join_components(&[".turbo", "cache"])
}
}

Expand Down