Stream build backend output to debug! (#6903)

## Summary

We need to decide whether we want this in `debug!` or `tracing!`. We
also _probably_ (?) want to show this by default in `uv build`.

Closes https://github.com/astral-sh/uv/issues/1567.

Closes https://github.com/astral-sh/uv/issues/5893.
This commit is contained in:
Charlie Marsh 2024-09-02 15:46:09 -04:00 committed by GitHub
parent 8eef1a2314
commit 6897001fee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 111 additions and 56 deletions

View file

@ -8,7 +8,7 @@ use std::path::Path;
use fs_err as fs;
use fs_err::File;
use itertools::Itertools;
use tracing::info;
use tracing::debug;
use pypi_types::Scheme;
use uv_fs::{cachedir, Simplified, CWD};
@ -92,16 +92,16 @@ pub(crate) fn create(
)));
} else if metadata.is_dir() {
if allow_existing {
info!("Allowing existing directory");
debug!("Allowing existing directory");
} else if location.join("pyvenv.cfg").is_file() {
info!("Removing existing directory");
debug!("Removing existing directory");
fs::remove_dir_all(location)?;
fs::create_dir_all(location)?;
} else if location
.read_dir()
.is_ok_and(|mut dir| dir.next().is_none())
{
info!("Ignoring empty directory");
debug!("Ignoring empty directory");
} else {
return Err(Error::Io(io::Error::new(
io::ErrorKind::AlreadyExists,