Skip to content

Commit f0604ae

Browse files
committed
docs(contrib): Move some lower resolver details from ops to core
1 parent 7fc7216 commit f0604ae

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/cargo/core/resolver/mod.rs

+11
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,17 @@
3737
//! everything to bail out immediately and return success, and only if *nothing*
3838
//! works do we actually return an error up the stack.
3939
//!
40+
//! Resolution is currently performed twice
41+
//! 1. With all features enabled (this is what gets saved to `Cargo.lock`)
42+
//! 2. With only the specific features the user selected on the command-line. Ideally this
43+
//! run will get removed in the future when transitioning to the new feature resolver.
44+
//!
45+
//! A new feature-specific resolver was added in 2020 which adds more sophisticated feature
46+
//! resolution. It is located in the [`features`] module. The original dependency resolver still
47+
//! performs feature unification, as it can help reduce the dependencies it has to consider during
48+
//! resolution (rather than assuming every optional dependency of every package is enabled).
49+
//! Checking if a feature is enabled must go through the new feature resolver.
50+
//!
4051
//! ## Performance
4152
//!
4253
//! Note that this is a relatively performance-critical portion of Cargo. The

src/cargo/ops/resolve.rs

-12
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,6 @@
1212
//! - [`resolve_with_previous`]: A low-level function for running the resolver,
1313
//! providing the most power and flexibility.
1414
//!
15-
//! Resolution is currently performed twice
16-
//! 1. With all features enabled (this is what gets saved to `Cargo.lock`)
17-
//! 2. With only the specific features the user selected on the command-line. Ideally this
18-
//! run will get removed in the future when transitioning to the new feature resolver.
19-
//!
20-
//! A new feature-specific resolver was added in 2020 which adds more sophisticated feature
21-
//! resolution. It is located in the [`crate::core::resolver::features`] module. The original
22-
//! dependency resolver still performs feature unification, as it can help reduce the dependencies
23-
//! it has to consider during resolution (rather than assuming every optional dependency of every
24-
//! package is enabled). Checking if a feature is enabled must go through the new feature
25-
//! resolver.
26-
//!
2715
//! ### Data Structures
2816
//!
2917
//! - [`Workspace`]:

0 commit comments

Comments
 (0)