-
Notifications
You must be signed in to change notification settings - Fork 2.9k
universal-lock: refactor resolver state into explicit type #3354
Copy link
Copy link
Closed
Labels
previewExperimental behaviorExperimental behavior
Description
Currently, our resolver's state (managed across different calls to unit propagation) is tracked implicitly on the stack of our solve routine:
uv/crates/uv-resolver/src/resolver/mod.rs
Lines 288 to 300 in e33ff95
| ) -> Result<ResolutionGraph, ResolveError> { | |
| let root = PubGrubPackage::Root(self.project.clone()); | |
| let mut prefetcher = BatchPrefetcher::default(); | |
| // Keep track of the packages for which we've requested metadata. | |
| let mut pins = FilePins::default(); | |
| let mut priorities = PubGrubPriorities::default(); | |
| // Start the solve. | |
| let mut state = State::init(root.clone(), MIN_VERSION.clone()); | |
| let mut added_dependencies: FxHashMap<PubGrubPackage, FxHashSet<Version>> = | |
| FxHashMap::default(); | |
| let mut next = root; |
This state needs to get pushed out into its own type so that we can work with it more explicitly. For example, as part of #3350, we'll need to be able to fork the resolver and thus will need to be able to clone the state.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
previewExperimental behaviorExperimental behavior