From 75e5f69d44f5a9354718fed3ad94283fa0f79e9c Mon Sep 17 00:00:00 2001 From: konstin Date: Mon, 3 Nov 2025 16:22:26 -0500 Subject: [PATCH] Log the path of the locked file Currently, the acquire and release messages mismatch on what resource they act on, the acquire message shows only the resource, the release message shows only the locked file. ``` DEBUG Acquired lock for `https://github.com/tqdm/tqdm` DEBUG Using existing Git source `https://github.com/tqdm/tqdm` DEBUG Released lock at `C:\Users\Konsti\AppData\Local\uv\cache\git-v0\locks\16bb813afef8edd2` ``` --- crates/uv-fs/src/lib.rs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/crates/uv-fs/src/lib.rs b/crates/uv-fs/src/lib.rs index c73f486f8..04072f4de 100644 --- a/crates/uv-fs/src/lib.rs +++ b/crates/uv-fs/src/lib.rs @@ -680,7 +680,10 @@ impl LockedFile { ); match file.file().try_lock_exclusive() { Ok(()) => { - debug!("Acquired lock for `{resource}`"); + debug!( + "Acquired lock for `{resource}` at `{}`", + file.path().user_display() + ); Ok(Self(file)) } Err(err) => { @@ -701,7 +704,10 @@ impl LockedFile { )) })?; - debug!("Acquired lock for `{resource}`"); + debug!( + "Acquired lock for `{resource}` at `{}`", + file.path().user_display() + ); Ok(Self(file)) } } @@ -715,7 +721,10 @@ impl LockedFile { ); match file.file().try_lock_exclusive() { Ok(()) => { - debug!("Acquired lock for `{resource}`"); + debug!( + "Acquired lock for `{resource}` at `{}`", + file.path().user_display() + ); Some(Self(file)) } Err(err) => {