Skip to content

Commit

Permalink
Do not use a user-facing warning for "Waiting to acquire lock..." mes…
Browse files Browse the repository at this point in the history
…sage
  • Loading branch information
zanieb committed Sep 18, 2024
1 parent 67cfb4a commit 945d76a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/uv-fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ license = { workspace = true }
workspace = true

[dependencies]
uv-warnings = { workspace = true }

backoff = { workspace = true }
cachedir = { workspace = true }
Expand Down
8 changes: 3 additions & 5 deletions crates/uv-fs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ use fs2::FileExt;
use std::fmt::Display;
use std::path::{Path, PathBuf};
use tempfile::NamedTempFile;
use tracing::{debug, error, trace, warn};

use uv_warnings::warn_user;
use tracing::{debug, error, info, trace, warn};

pub use crate::path::*;

Expand Down Expand Up @@ -329,8 +327,8 @@ impl LockedFile {
// Log error code and enum kind to help debugging more exotic failures
// TODO(zanieb): When `raw_os_error` stabilizes, use that to avoid displaying
// the error when it is `WouldBlock`, which is expected and noisy otherwise.
trace!("Try lock error, waiting for exclusive lock: {:?}", err);
warn_user!(
trace!("Try lock error: {err:?}");
info!(
"Waiting to acquire lock for `{resource}` at `{}`",
file.path().user_display(),
);
Expand Down

0 comments on commit 945d76a

Please sign in to comment.