From 1aaae7ee313826cb5631585f9fb9a363fdb4b654 Mon Sep 17 00:00:00 2001 From: UebelAndre Date: Mon, 2 Dec 2024 15:56:41 -0800 Subject: [PATCH] logging --- .../src/metadata/cargo_tree_resolver.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/crate_universe/src/metadata/cargo_tree_resolver.rs b/crate_universe/src/metadata/cargo_tree_resolver.rs index 2b111ddfd3..33aef738a7 100644 --- a/crate_universe/src/metadata/cargo_tree_resolver.rs +++ b/crate_universe/src/metadata/cargo_tree_resolver.rs @@ -142,14 +142,18 @@ impl TreeResolver { // This is unfortunately a bit of a hack. See: // - https://github.com/rust-lang/cargo/issues/9863 // - https://github.com/bazelbuild/rules_rust/issues/1662 - let child = self - .cargo_bin - .command()? + let mut command = self.cargo_bin.command()?; + + command // These next two environment variables are used to hack cargo into using a custom // host triple instead of the host triple detected by rustc. .env("RUSTC_WRAPPER", rustc_wrapper) .env("HOST_TRIPLE", host_triple) - .current_dir(manifest_path.parent().expect("All manifests should have a valid parent.")) + .current_dir( + manifest_path + .parent() + .expect("All manifests should have a valid parent."), + ) .arg("tree") .arg("--manifest-path") .arg(manifest_path) @@ -162,7 +166,9 @@ impl TreeResolver { .arg("--charset=ascii") .arg("--workspace") .arg("--target") - .arg(target_triple) + .arg(target_triple); + debug!("Cargo tree command: {:#?}", command); + let child = command .stdout(std::process::Stdio::piped()) .stderr(std::process::Stdio::piped()) .spawn()