Skip to content

Commit 62a9e33

Browse files
committed
Show resolution diagnostics after pip install
1 parent 2ac562b commit 62a9e33

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

crates/uv/src/commands/pip_install.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,17 @@ async fn resolve(
595595
.dimmed()
596596
)?;
597597

598+
// Notify the user of any diagnostics.
599+
for diagnostic in resolution.diagnostics() {
600+
writeln!(
601+
printer.stderr(),
602+
"{}{} {}",
603+
"warning".yellow().bold(),
604+
":".bold(),
605+
diagnostic.message().bold()
606+
)?;
607+
}
608+
598609
Ok(resolution)
599610
}
600611

crates/uv/tests/pip_install_scenarios.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,7 @@ fn missing_extra() {
708708
709709
----- stderr -----
710710
Resolved 1 package in [TIME]
711+
warning: The package `package-a==1.0.0` does not have an extra named `extra`.
711712
Downloaded 1 package in [TIME]
712713
Installed 1 package in [TIME]
713714
+ package-a==1.0.0
@@ -1080,6 +1081,7 @@ fn extra_does_not_exist_backtrack() {
10801081
10811082
----- stderr -----
10821083
Resolved 1 package in [TIME]
1084+
warning: The package `package-a==3.0.0` does not have an extra named `extra`.
10831085
Downloaded 1 package in [TIME]
10841086
Installed 1 package in [TIME]
10851087
+ package-a==3.0.0

0 commit comments

Comments
 (0)