Show resolution diagnostics after pip install (#2829)

## Summary

These are shown in `pip compile`, but absent from `pip install`.

See: #2828.
This commit is contained in:
Charlie Marsh 2024-04-04 23:13:01 -04:00 committed by GitHub
parent 2ac562b40d
commit 2f386ef440
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View file

@ -595,6 +595,17 @@ async fn resolve(
.dimmed()
)?;
// Notify the user of any diagnostics.
for diagnostic in resolution.diagnostics() {
writeln!(
printer.stderr(),
"{}{} {}",
"warning".yellow().bold(),
":".bold(),
diagnostic.message().bold()
)?;
}
Ok(resolution)
}

View file

@ -708,6 +708,7 @@ fn missing_extra() {
----- stderr -----
Resolved 1 package in [TIME]
warning: The package `package-a==1.0.0` does not have an extra named `extra`.
Downloaded 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==1.0.0
@ -1080,6 +1081,7 @@ fn extra_does_not_exist_backtrack() {
----- stderr -----
Resolved 1 package in [TIME]
warning: The package `package-a==3.0.0` does not have an extra named `extra`.
Downloaded 1 package in [TIME]
Installed 1 package in [TIME]
+ package-a==3.0.0