@@ -9,7 +9,7 @@ use anyhow::{anyhow, bail, Context, Result};
99use camino:: Utf8Path ;
1010use semver:: Version ;
1111use serde:: { Deserialize , Serialize } ;
12- use tracing:: debug;
12+ use tracing:: { debug, trace } ;
1313use url:: Url ;
1414
1515use crate :: config:: CrateId ;
@@ -137,6 +137,12 @@ impl TreeResolver {
137137 // number of processes (which can be +400 and hit operating system limitations).
138138 let mut target_triple_to_child = BTreeMap :: < String , Child > :: new ( ) ;
139139
140+ debug ! (
141+ "Spawning `cargo tree` processes for host `{}`: {}" ,
142+ host_triple,
143+ cargo_target_triples. keys( ) . len( ) ,
144+ ) ;
145+
140146 for target_triple in cargo_target_triples. keys ( ) {
141147 // We use `cargo tree` here because `cargo metadata` doesn't report
142148 // back target-specific features (enabled with `resolver = "2"`).
@@ -178,12 +184,6 @@ impl TreeResolver {
178184 target_triple_to_child. insert ( target_triple. clone ( ) , child) ;
179185 }
180186
181- debug ! (
182- "Spawned `cargo tree` processes for host `{}`: {}" ,
183- host_triple,
184- target_triple_to_child. len( ) ,
185- ) ;
186-
187187 for ( target_triple, child) in target_triple_to_child. into_iter ( ) {
188188 let output = child. wait_with_output ( ) . with_context ( || {
189189 format ! (
@@ -194,11 +194,13 @@ impl TreeResolver {
194194 )
195195 } ) ?;
196196 if !output. status . success ( ) {
197- eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
198- eprintln ! ( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
197+ tracing :: error !( "{}" , String :: from_utf8_lossy( & output. stdout) ) ;
198+ tracing :: error !( "{}" , String :: from_utf8_lossy( & output. stderr) ) ;
199199 bail ! ( format!( "Failed to run cargo tree: {}" , output. status) )
200200 }
201201
202+ tracing:: trace!( "`cargo tree --target={}` completed." , target_triple) ;
203+
202204 // Replicate outputs for any de-duplicated platforms
203205 for host_plat in cargo_host_triples[ host_triple] . iter ( ) {
204206 for target_plat in cargo_target_triples[ & target_triple] . iter ( ) {
@@ -348,7 +350,7 @@ impl TreeResolver {
348350
349351 for ( host_triple, target_streams) in deps_tree_streams. into_iter ( ) {
350352 for ( target_triple, stdout) in target_streams. into_iter ( ) {
351- debug ! (
353+ trace ! (
352354 "Parsing (host={}) `cargo tree --target {}` output:\n ```\n {}\n ```" ,
353355 host_triple,
354356 target_triple,
0 commit comments