mirror of https://github.com/astral-sh/uv
Add distinctive logging for cache prune phases (#7114)
This commit is contained in:
parent
93fe3e83be
commit
72b73a506b
|
|
@ -404,13 +404,13 @@ impl Cache {
|
|||
// If the directory is not a cache bucket, remove it.
|
||||
if CacheBucket::iter().all(|bucket| entry.file_name() != bucket.to_str()) {
|
||||
let path = entry.path();
|
||||
debug!("Removing dangling cache entry: {}", path.display());
|
||||
debug!("Removing dangling cache bucket: {}", path.display());
|
||||
summary += rm_rf(path)?;
|
||||
}
|
||||
} else {
|
||||
// If the file is not a marker file, remove it.
|
||||
let path = entry.path();
|
||||
debug!("Removing dangling cache entry: {}", path.display());
|
||||
debug!("Removing dangling cache bucket: {}", path.display());
|
||||
summary += rm_rf(path)?;
|
||||
}
|
||||
}
|
||||
|
|
@ -422,7 +422,7 @@ impl Cache {
|
|||
for entry in entries {
|
||||
let entry = entry?;
|
||||
let path = fs_err::canonicalize(entry.path())?;
|
||||
debug!("Removing dangling cache entry: {}", path.display());
|
||||
debug!("Removing dangling cache environment: {}", path.display());
|
||||
summary += rm_rf(path)?;
|
||||
}
|
||||
}
|
||||
|
|
@ -481,7 +481,7 @@ impl Cache {
|
|||
let entry = entry?;
|
||||
let path = fs_err::canonicalize(entry.path())?;
|
||||
if !references.contains(&path) {
|
||||
debug!("Removing dangling cache entry: {}", path.display());
|
||||
debug!("Removing dangling cache archive: {}", path.display());
|
||||
summary += rm_rf(path)?;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ fn prune_stale_directory() -> Result<()> {
|
|||
----- stderr -----
|
||||
DEBUG uv [VERSION] ([COMMIT] DATE)
|
||||
Pruning cache at: [CACHE_DIR]/
|
||||
DEBUG Removing dangling cache entry: [CACHE_DIR]/simple-v4
|
||||
DEBUG Removing dangling cache bucket: [CACHE_DIR]/simple-v4
|
||||
Removed 1 directory
|
||||
"###);
|
||||
|
||||
|
|
@ -120,8 +120,8 @@ fn prune_cached_env() {
|
|||
----- stderr -----
|
||||
DEBUG uv [VERSION] ([COMMIT] DATE)
|
||||
Pruning cache at: [CACHE_DIR]/
|
||||
DEBUG Removing dangling cache entry: [CACHE_DIR]/environments-v1/[ENTRY]
|
||||
DEBUG Removing dangling cache entry: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
DEBUG Removing dangling cache environment: [CACHE_DIR]/environments-v1/[ENTRY]
|
||||
DEBUG Removing dangling cache archive: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
Removed [N] files ([SIZE])
|
||||
"###);
|
||||
}
|
||||
|
|
@ -165,7 +165,7 @@ fn prune_stale_symlink() -> Result<()> {
|
|||
----- stderr -----
|
||||
DEBUG uv [VERSION] ([COMMIT] DATE)
|
||||
Pruning cache at: [CACHE_DIR]/
|
||||
DEBUG Removing dangling cache entry: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
DEBUG Removing dangling cache archive: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
Removed 44 files ([SIZE])
|
||||
"###);
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ fn prune_stale_revision() -> Result<()> {
|
|||
DEBUG uv [VERSION] ([COMMIT] DATE)
|
||||
Pruning cache at: [CACHE_DIR]/
|
||||
DEBUG Removing dangling source revision: [CACHE_DIR]/built-wheels-v3/[ENTRY]
|
||||
DEBUG Removing dangling cache entry: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
DEBUG Removing dangling cache archive: [CACHE_DIR]/archive-v0/[ENTRY]
|
||||
Removed 8 files ([SIZE])
|
||||
"###);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue