uv-resolver: remove 'package_markers'

This was completely unused. I noticed this while trying to read
and understand the code. It's unclear when or how this happened.
This commit is contained in:
Andrew Gallant 2024-11-21 10:31:07 -05:00 committed by Andrew Gallant
parent 085fde8955
commit a66b0eb931
2 changed files with 0 additions and 22 deletions

View file

@ -33,8 +33,6 @@ use crate::{
VersionsResponse,
};
pub(crate) type MarkersForDistribution = Vec<MarkerTree>;
/// The output of a successful resolution.
///
/// Includes a complete resolution graph in which every node represents a pinned package and every
@ -119,24 +117,10 @@ impl ResolverOutput {
// Add the root node.
let root_index = graph.add_node(ResolutionGraphNode::Root);
let mut package_markers: FxHashMap<PackageName, MarkersForDistribution> =
FxHashMap::default();
let mut seen = FxHashSet::default();
for resolution in resolutions {
// Add every package to the graph.
for (package, version) in &resolution.nodes {
if package.is_base() {
// For packages with diverging versions, store which version comes from which
// fork.
if let Some(markers) = resolution.env.try_markers() {
package_markers
.entry(package.name.clone())
.or_default()
.push(markers.clone());
}
}
if !seen.insert((package, version)) {
// Insert each node only once.
continue;

View file

@ -2612,12 +2612,6 @@ pub(crate) struct ResolutionDependencyEdge {
pub(crate) marker: MarkerTree,
}
impl ResolutionPackage {
pub(crate) fn is_base(&self) -> bool {
self.extra.is_none() && self.dev.is_none()
}
}
/// Fetch the metadata for an item
#[derive(Debug)]
#[allow(clippy::large_enum_variant)]