feat(install): Including Locking message

As we switch to MSRV-aware resolver, this will help users work out why
MSRV-aware resolving isn't helping them.

This will also make it more obvious if we breaking things when
developing the MSRV-aware resolver.
This commit is contained in:
Ed Page 2024-04-16 13:35:25 -05:00
parent c38673c665
commit 1d0c6ebd8f
5 changed files with 10 additions and 0 deletions

View File

@ -147,6 +147,7 @@ pub fn resolve_ws_with_opts<'gctx>(
specs, specs,
add_patches, add_patches,
)?; )?;
ops::print_lockfile_changes(ws, None, &resolved_with_overrides, &mut registry)?;
(resolve, resolved_with_overrides) (resolve, resolved_with_overrides)
} else if ws.require_optional_deps() { } else if ws.require_optional_deps() {
// First, resolve the root_package's *listed* dependencies, as well as // First, resolve the root_package's *listed* dependencies, as well as
@ -205,6 +206,8 @@ pub fn resolve_ws_with_opts<'gctx>(
specs, specs,
add_patches, add_patches,
)?; )?;
// Skipping `print_lockfile_changes` as there are cases where this prints irrelevant
// information
(resolve, resolved_with_overrides) (resolve, resolved_with_overrides)
}; };

View File

@ -148,6 +148,7 @@ fn simple_install() {
.with_stderr( .with_stderr(
"\ "\
[INSTALLING] bar v0.1.0 [INSTALLING] bar v0.1.0
[LOCKING] 2 packages to latest compatible versions
[COMPILING] foo v0.0.1 [COMPILING] foo v0.0.1
[COMPILING] bar v0.1.0 [COMPILING] bar v0.1.0
[FINISHED] `release` profile [optimized] target(s) in [..]s [FINISHED] `release` profile [optimized] target(s) in [..]s
@ -243,6 +244,7 @@ fn install_without_feature_dep() {
.with_stderr( .with_stderr(
"\ "\
[INSTALLING] bar v0.1.0 [INSTALLING] bar v0.1.0
[LOCKING] 2 packages to latest compatible versions
[COMPILING] foo v0.0.1 [COMPILING] foo v0.0.1
[COMPILING] bar v0.1.0 [COMPILING] bar v0.1.0
[FINISHED] `release` profile [optimized] target(s) in [..]s [FINISHED] `release` profile [optimized] target(s) in [..]s

View File

@ -2410,6 +2410,8 @@ fn self_referential() {
[DOWNLOADING] crates ... [DOWNLOADING] crates ...
[DOWNLOADED] foo v0.0.2 (registry [..]) [DOWNLOADED] foo v0.0.2 (registry [..])
[INSTALLING] foo v0.0.2 [INSTALLING] foo v0.0.2
[LOCKING] 2 packages to latest compatible versions
[ADDING] foo v0.0.1 (latest: v0.0.2)
[DOWNLOADING] crates ... [DOWNLOADING] crates ...
[DOWNLOADED] foo v0.0.1 (registry [..]) [DOWNLOADED] foo v0.0.1 (registry [..])
[COMPILING] foo v0.0.1 [COMPILING] foo v0.0.1
@ -2455,6 +2457,7 @@ fn ambiguous_registry_vs_local_package() {
"\ "\
[INSTALLING] foo v0.1.0 ([..]) [INSTALLING] foo v0.1.0 ([..])
[UPDATING] `[..]` index [UPDATING] `[..]` index
[LOCKING] 2 packages to latest compatible versions
[DOWNLOADING] crates ... [DOWNLOADING] crates ...
[DOWNLOADED] foo v0.0.1 (registry [..]) [DOWNLOADED] foo v0.0.1 (registry [..])
[COMPILING] foo v0.0.1 [COMPILING] foo v0.0.1

View File

@ -415,6 +415,7 @@ dependencies = [
"\ "\
[UPDATING] `[..]` index [UPDATING] `[..]` index
[INSTALLING] foo v0.1.0 [INSTALLING] foo v0.1.0
[LOCKING] 2 packages to latest compatible versions
[DOWNLOADING] crates ... [DOWNLOADING] crates ...
[DOWNLOADED] bar v0.1.1 (registry `[..]`) [DOWNLOADED] bar v0.1.1 (registry `[..]`)
[COMPILING] bar v0.1.1 [COMPILING] bar v0.1.1

View File

@ -1129,6 +1129,7 @@ Consider enabling them by passing, e.g., `--features=\"bar/a\"`
.with_stderr( .with_stderr(
"\ "\
[INSTALLING] foo v0.0.1 ([..]) [INSTALLING] foo v0.0.1 ([..])
[LOCKING] 2 packages to latest compatible versions
[FINISHED] `release` profile [optimized] target(s) in [..] [FINISHED] `release` profile [optimized] target(s) in [..]
[WARNING] none of the package's binaries are available for install using the selected features [WARNING] none of the package's binaries are available for install using the selected features
bin \"foo\" requires the features: `bar/a` bin \"foo\" requires the features: `bar/a`