Skip to content

Commit

Permalink
fix(semantic): improve conflict error
Browse files Browse the repository at this point in the history
  • Loading branch information
philpax committed Sep 15, 2023
1 parent 4494506 commit d079bdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions shared_crates/package_semantic/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,17 +198,17 @@ impl Semantic {
fn imported_by(items: &ItemMap, package: &Package) -> String {
match package.dependent_package_id {
Some(dependent_id) => {
format!("\n - imported by {}", items.get(dependent_id).locator)
format!("\n imported by {}", items.get(dependent_id).locator)
}
None => String::new(),
}
}

anyhow::bail!(
"package conflict found:\n - {present}{}\n\n - {locator}{}\n\n{}",
"Package conflict found:\n - {present}{}\n\n - {locator}{}\n\n{}",
imported_by(&self.items, present_package),
imported_by(&self.items, locator_package),
"the system does not currently support multiple versions of the same package in the dependency tree"
"The system does not currently support multiple versions of the same package in the dependency tree."
);
}
}
Expand Down

0 comments on commit d079bdf

Please sign in to comment.