@@ -16,7 +16,7 @@ use uv_distribution_types::{
1616use uv_git:: GitResolver ;
1717use uv_normalize:: { ExtraName , GroupName , PackageName } ;
1818use uv_pep440:: { Version , VersionSpecifier } ;
19- use uv_pep508:: { MarkerEnvironment , MarkerTree , MarkerTreeKind , VerbatimUrl } ;
19+ use uv_pep508:: { MarkerEnvironment , MarkerTree , MarkerTreeKind } ;
2020use uv_pypi_types:: { HashDigest , ParsedUrlError , Requirement , VerbatimParsedUrl , Yanked } ;
2121
2222use crate :: graph_ops:: marker_reachability;
@@ -31,7 +31,7 @@ use crate::{
3131 ResolverMarkers , VersionsResponse ,
3232} ;
3333
34- pub ( crate ) type MarkersForDistribution = FxHashMap < ( Version , Option < VerbatimUrl > ) , Vec < MarkerTree > > ;
34+ pub ( crate ) type MarkersForDistribution = Vec < MarkerTree > ;
3535
3636/// A complete resolution graph in which every node represents a pinned package and every edge
3737/// represents a dependency between two pinned packages.
@@ -54,9 +54,6 @@ pub struct ResolutionGraph {
5454 pub ( crate ) overrides : Overrides ,
5555 /// The options that were used to build the graph.
5656 pub ( crate ) options : Options ,
57- /// If there are multiple options for a package, track which fork they belong to so we
58- /// can write that to the lockfile and later get the correct preference per fork back.
59- pub ( crate ) package_markers : FxHashMap < PackageName , MarkersForDistribution > ,
6057}
6158
6259#[ derive( Debug , Clone ) ]
@@ -131,8 +128,6 @@ impl ResolutionGraph {
131128 package_markers
132129 . entry ( package. name . clone ( ) )
133130 . or_default ( )
134- . entry ( ( version. clone ( ) , package. url . clone ( ) . map ( |url| url. verbatim ) ) )
135- . or_default ( )
136131 . push ( markers. clone ( ) ) ;
137132 }
138133 }
@@ -239,7 +234,6 @@ impl ResolutionGraph {
239234 let graph = Self {
240235 petgraph,
241236 requires_python,
242- package_markers,
243237 diagnostics,
244238 requirements : requirements. to_vec ( ) ,
245239 constraints : constraints. clone ( ) ,
@@ -727,22 +721,6 @@ impl ResolutionGraph {
727721 Ok ( conjunction)
728722 }
729723
730- /// If there are multiple distributions for the same package name, return the markers of the
731- /// fork(s) that contained this distribution, otherwise return `None`.
732- pub fn fork_markers (
733- & self ,
734- package_name : & PackageName ,
735- version : & Version ,
736- url : Option < & VerbatimUrl > ,
737- ) -> Option < & Vec < MarkerTree > > {
738- let package_markers = & self . package_markers . get ( package_name) ?;
739- if package_markers. len ( ) == 1 {
740- None
741- } else {
742- Some ( & package_markers[ & ( version. clone ( ) , url. cloned ( ) ) ] )
743- }
744- }
745-
746724 /// Returns a sequence of conflicting distribution errors from this
747725 /// resolution.
748726 ///
0 commit comments