Skip to content

Commit

Permalink
Auto merge of #5258 - djc:split-resolver, r=Eh2406
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
bors committed Mar 29, 2018
2 parents 434c702 + d0bedf0 commit 97e8afe
Show file tree
Hide file tree
Showing 5 changed files with 1,335 additions and 1,293 deletions.
3 changes: 2 additions & 1 deletion src/cargo/core/resolver/conflict_cache.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
use std::collections::{HashMap, HashSet};

use core::{Dependency, PackageId};
use core::resolver::{ConflictReason, Context};
use core::resolver::Context;
use super::types::ConflictReason;

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

0 comments on commit 97e8afe

Please sign in to comment.