Skip to content

Commit 3548057

Browse files
committed
Auto merge of #5258 - djc:split-resolver, r=Eh2406
Split resolver module to make it more manageable The `core::resolver` module is currently the largest in Cargo, at some 2000 lines. Here's an attempt at splitting it into more reasonable parts and reordering the code in it for better comprehensibility. Splitting is done in three major steps: * Move the `Resolve` type and its dependencies into a separate module (~220 lines) * Move utility data types into a separate module (~400 lines) * Move the `Context` type and its dependencies into a separate module (~400 lines) This halves the size of the root module, which is then reordered to make it more readable. (This is a yak-shaving expedition of sorts, in preparation for #1286.)
2 parents 434c702 + 45da574 commit 3548057

5 files changed

Lines changed: 1335 additions & 1293 deletions

File tree

src/cargo/core/resolver/conflict_cache.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
use std::collections::{HashMap, HashSet};
22

33
use core::{Dependency, PackageId};
4-
use core::resolver::{ConflictReason, Context};
4+
use core::resolver::Context;
5+
use super::types::ConflictReason;
56

67
pub(super) struct ConflictCache {
78
// `con_from_dep` is a cache of the reasons for each time we

0 commit comments

Comments
 (0)