fix(install): Don't respect MSRV for non-local installs

This is part of #9930
This commit is contained in:
Ed Page 2024-04-23 10:14:38 -05:00
parent cd8d5f7c10
commit dcbf2b5d32
2 changed files with 6 additions and 5 deletions

View File

@ -819,7 +819,9 @@ fn make_ws_rustc_target<'gctx>(
let mut ws = if source_id.is_git() || source_id.is_path() {
Workspace::new(pkg.manifest_path(), gctx)?
} else {
Workspace::ephemeral(pkg, gctx, None, false)?
let mut ws = Workspace::ephemeral(pkg, gctx, None, false)?;
ws.set_resolve_honors_rust_version(Some(false));
ws
};
ws.set_ignore_lock(gctx.lock_update_allowed());
ws.set_require_optional_deps(false);

View File

@ -1146,11 +1146,10 @@ fn cargo_install_ignores_msrv_config() {
[DOWNLOADING] crates ...
[DOWNLOADED] foo v0.0.1 (registry [..])
[INSTALLING] foo v0.0.1
[LOCKING] 2 packages to latest Rust 1.60 compatible versions
[ADDING] dep v1.0.0 (latest: v1.1.0)
[LOCKING] 2 packages to latest compatible versions
[DOWNLOADING] crates ...
[DOWNLOADED] dep v1.0.0 (registry [..])
[COMPILING] dep v1.0.0
[DOWNLOADED] dep v1.1.0 (registry [..])
[COMPILING] dep v1.1.0
[COMPILING] foo v0.0.1
[FINISHED] `release` profile [optimized] target(s) in [..]
[INSTALLING] [CWD]/home/.cargo/bin/foo[EXE]