Unnamed repository; edit this file 'description' to name the repository.
Remove lockfile-path support for Cargo versions below 1.94.0
Chayim Refael Friedman 2 weeks ago
parent 363940d · commit 05fcbfe
-rw-r--r--crates/project-model/src/build_dependencies.rs4
-rw-r--r--crates/project-model/src/cargo_config_file.rs13
-rw-r--r--crates/project-model/src/cargo_workspace.rs4
3 files changed, 0 insertions, 21 deletions
diff --git a/crates/project-model/src/build_dependencies.rs b/crates/project-model/src/build_dependencies.rs
index 9f84f632d5..926a9e327e 100644
--- a/crates/project-model/src/build_dependencies.rs
+++ b/crates/project-model/src/build_dependencies.rs
@@ -473,10 +473,6 @@ impl WorkspaceBuildScripts {
if let Some(lockfile_copy) = &lockfile_copy {
requires_unstable_options = true;
match lockfile_copy.usage {
- LockfileUsage::WithFlag => {
- cmd.arg("--lockfile-path");
- cmd.arg(lockfile_copy.path.as_str());
- }
LockfileUsage::WithEnvVarUnstable => {
cmd.arg("-Zlockfile-path");
cmd.env(
diff --git a/crates/project-model/src/cargo_config_file.rs b/crates/project-model/src/cargo_config_file.rs
index defd9f96ab..a6bfea8200 100644
--- a/crates/project-model/src/cargo_config_file.rs
+++ b/crates/project-model/src/cargo_config_file.rs
@@ -143,8 +143,6 @@ pub(crate) struct LockfileCopy {
}
pub(crate) enum LockfileUsage {
- /// Rust [1.82.0, 1.95.0). `cargo <subcmd> --lockfile-path <lockfile path>`
- WithFlag,
/// Rust [1.95.0, 1.97.0). `CARGO_RESOLVER_LOCKFILE_PATH=<lockfile path> cargo -Zlockfile-path <subcmd>`
WithEnvVarUnstable,
/// Rust >= 1.97.0. `CARGO_RESOLVER_LOCKFILE_PATH=<lockfile path> cargo <subcmd>`
@@ -155,15 +153,6 @@ pub(crate) fn make_lockfile_copy(
toolchain_version: &semver::Version,
lockfile_path: &Utf8Path,
) -> Option<LockfileCopy> {
- const MINIMUM_TOOLCHAIN_VERSION_SUPPORTING_LOCKFILE_PATH_FLAG: semver::Version =
- semver::Version {
- major: 1,
- minor: 82,
- patch: 0,
- pre: semver::Prerelease::EMPTY,
- build: semver::BuildMetadata::EMPTY,
- };
-
const MINIMUM_TOOLCHAIN_VERSION_SUPPORTING_LOCKFILE_PATH_ENV_UNSTABLE: semver::Version =
semver::Version {
major: 1,
@@ -187,8 +176,6 @@ pub(crate) fn make_lockfile_copy(
} else if *toolchain_version >= MINIMUM_TOOLCHAIN_VERSION_SUPPORTING_LOCKFILE_PATH_ENV_UNSTABLE
{
LockfileUsage::WithEnvVarUnstable
- } else if *toolchain_version >= MINIMUM_TOOLCHAIN_VERSION_SUPPORTING_LOCKFILE_PATH_FLAG {
- LockfileUsage::WithFlag
} else {
return None;
};
diff --git a/crates/project-model/src/cargo_workspace.rs b/crates/project-model/src/cargo_workspace.rs
index 97375fe9dd..3db5a0fffc 100644
--- a/crates/project-model/src/cargo_workspace.rs
+++ b/crates/project-model/src/cargo_workspace.rs
@@ -767,10 +767,6 @@ impl FetchMetadata {
let mut using_lockfile_copy = false;
if let Some(lockfile_copy) = &lockfile_copy {
match lockfile_copy.usage {
- LockfileUsage::WithFlag => {
- other_options.push("--lockfile-path".to_owned());
- other_options.push(lockfile_copy.path.to_string());
- }
LockfileUsage::WithEnvVarUnstable => {
other_options.push("-Zlockfile-path".to_owned());
command.env("CARGO_RESOLVER_LOCKFILE_PATH", lockfile_copy.path.as_os_str());