Merge pull request #19290 from aibaars/patch-1
Add warning and debug information when `cargo metadata` fails
This commit is contained in:
commit
6a3ede1240
1 changed files with 17 additions and 1 deletions
|
@ -288,7 +288,23 @@ impl CargoWorkspace {
|
|||
locked: bool,
|
||||
progress: &dyn Fn(String),
|
||||
) -> anyhow::Result<(cargo_metadata::Metadata, Option<anyhow::Error>)> {
|
||||
Self::fetch_metadata_(cargo_toml, current_dir, config, sysroot, locked, false, progress)
|
||||
let res = Self::fetch_metadata_(
|
||||
cargo_toml,
|
||||
current_dir,
|
||||
config,
|
||||
sysroot,
|
||||
locked,
|
||||
false,
|
||||
progress,
|
||||
);
|
||||
if let Ok((_, Some(ref e))) = res {
|
||||
tracing::warn!(
|
||||
%cargo_toml,
|
||||
?e,
|
||||
"`cargo metadata` failed, but retry with `--no-deps` succeeded"
|
||||
);
|
||||
}
|
||||
res
|
||||
}
|
||||
|
||||
fn fetch_metadata_(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue