mirror of
https://github.com/astral-sh/uv.git
synced 2025-11-20 03:49:54 +00:00
Show fully-resolved URLs in non-resolution contexts (#689)
We now show the fully-resolved URL, rather than the URL as given by the user, _everywhere_ except for the output resolution file (which should retain relative paths, unexpanded environment variables, etc.). Closes https://github.com/astral-sh/puffin/issues/687.
This commit is contained in:
parent
43c837f7bb
commit
365c860e27
10 changed files with 123 additions and 39 deletions
|
|
@ -10,7 +10,7 @@ use pubgrub::type_aliases::SelectedDependencies;
|
|||
use rustc_hash::FxHashMap;
|
||||
use url::Url;
|
||||
|
||||
use distribution_types::{Dist, LocalEditable, Metadata, PackageId};
|
||||
use distribution_types::{Dist, LocalEditable, Metadata, PackageId, Verbatim};
|
||||
use pep440_rs::Version;
|
||||
use pep508_rs::{Requirement, VerbatimUrl};
|
||||
use puffin_normalize::{ExtraName, PackageName};
|
||||
|
|
@ -212,9 +212,9 @@ impl std::fmt::Display for ResolutionGraph {
|
|||
// Print out the dependency graph.
|
||||
for (index, package) in nodes {
|
||||
if let Some((editable, _)) = self.editables.get(package.name()) {
|
||||
writeln!(f, "-e {editable}")?;
|
||||
writeln!(f, "-e {}", editable.verbatim())?;
|
||||
} else {
|
||||
writeln!(f, "{package}")?;
|
||||
writeln!(f, "{}", package.verbatim())?;
|
||||
}
|
||||
|
||||
let mut edges = self
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue