Improve debug logging in dispatcher (#206)

Also makes the order of operations more similar to that of the
`pip-compile` command.
This commit is contained in:
Charlie Marsh 2023-10-26 11:54:47 -07:00 committed by GitHub
parent 5ad58474ca
commit 7bce41498e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 121 additions and 55 deletions

View file

@ -444,9 +444,12 @@ impl<'a, Context: BuildContext + Sync> Resolver<'a, Context> {
}
PubGrubPackage::Package(package_name, extra) => {
if let Some(extra) = extra.as_ref() {
debug!("Fetching dependencies for {}[{:?}]", package_name, extra);
debug!(
"Fetching dependencies for {}[{:?}]@{}",
package_name, extra, version
);
} else {
debug!("Fetching dependencies for {}", package_name);
debug!("Fetching dependencies for {}@{}", package_name, version);
}
// Wait for the metadata to be available.

View file

@ -71,7 +71,7 @@ pub(crate) async fn download_and_build_sdist(
client: &RegistryClient,
build_context: &impl BuildContext,
) -> Result<Metadata21> {
debug!("Building {}", &file.filename);
debug!("Building: {}", &file.filename);
let url = Url::parse(&file.url)?;
let reader = client.stream_external(&url).await?;
let mut reader = tokio::io::BufReader::new(reader.compat());
@ -97,7 +97,7 @@ pub(crate) async fn download_and_build_sdist(
let metadata21 = read_dist_info(wheel_dir.join(disk_filename)).await?;
debug!("Finished Building {}", &file.filename);
debug!("Finished building: {}", &file.filename);
Ok(metadata21)
}