Do not use a user-facing warning for "Waiting to acquire lock..." message (#7502)

Closes https://github.com/astral-sh/uv/issues/7489
This commit is contained in:
Zanie Blue 2024-09-18 10:34:27 -05:00 committed by GitHub
parent 4611412757
commit 8b830de94d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 7 deletions

1
Cargo.lock generated
View File

@ -4884,7 +4884,6 @@ dependencies = [
"tokio", "tokio",
"tracing", "tracing",
"urlencoding", "urlencoding",
"uv-warnings",
] ]
[[package]] [[package]]

View File

@ -13,7 +13,6 @@ license = { workspace = true }
workspace = true workspace = true
[dependencies] [dependencies]
uv-warnings = { workspace = true }
backoff = { workspace = true } backoff = { workspace = true }
cachedir = { workspace = true } cachedir = { workspace = true }

View File

@ -2,9 +2,7 @@ use fs2::FileExt;
use std::fmt::Display; use std::fmt::Display;
use std::path::{Path, PathBuf}; use std::path::{Path, PathBuf};
use tempfile::NamedTempFile; use tempfile::NamedTempFile;
use tracing::{debug, error, trace, warn}; use tracing::{debug, error, info, trace, warn};
use uv_warnings::warn_user;
pub use crate::path::*; pub use crate::path::*;
@ -329,8 +327,8 @@ impl LockedFile {
// Log error code and enum kind to help debugging more exotic failures // Log error code and enum kind to help debugging more exotic failures
// TODO(zanieb): When `raw_os_error` stabilizes, use that to avoid displaying // TODO(zanieb): When `raw_os_error` stabilizes, use that to avoid displaying
// the error when it is `WouldBlock`, which is expected and noisy otherwise. // the error when it is `WouldBlock`, which is expected and noisy otherwise.
trace!("Try lock error, waiting for exclusive lock: {:?}", err); trace!("Try lock error: {err:?}");
warn_user!( info!(
"Waiting to acquire lock for `{resource}` at `{}`", "Waiting to acquire lock for `{resource}` at `{}`",
file.path().user_display(), file.path().user_display(),
); );