-
Notifications
You must be signed in to change notification settings - Fork 2.9k
universal-lock: track version numbers for all distributions #3356
Copy link
Copy link
Closed
Labels
previewExperimental behaviorExperimental behavior
Description
When creating a Lock, we currently have a todo!() when trying to extract version numbers:
uv/crates/uv-resolver/src/lock.rs
Lines 281 to 287 in e33ff95
| let version = match resolved_dist.version_or_url() { | |
| VersionOrUrl::Version(v) => v.clone(), | |
| // TODO: We need a way to thread the version number for these | |
| // cases down into this routine. The version number isn't yet in a | |
| // `ResolutionGraph`, so this will require a bit of refactoring. | |
| VersionOrUrl::Url(_) => todo!(), | |
| }; |
For example, when the distribution comes from a direct URL, it only has a URL and not a version number:
uv/crates/distribution-types/src/lib.rs
Lines 567 to 571 in e33ff95
| impl DistributionMetadata for DirectUrlBuiltDist { | |
| fn version_or_url(&self) -> VersionOrUrl { | |
| VersionOrUrl::Url(&self.url) | |
| } | |
| } |
My understanding is that a version number exists for these distributions in their metadata, but we currently don't keep it around (I believe). We need the version number for our universal lock file, as part of #3347.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
previewExperimental behaviorExperimental behavior