chore(config): remove invocationLocation in favor of invocationStrategy

These flags were added to help rust-analyzer integrate with repos
requiring non-Cargo invocations. The consensus is that having two
independent settings are no longer needed. This change removes
`invocationLocation` in favor of `invocationStrategy` and changes
the internal representation of `InvocationStrategy::Once` to hold
the workspace root.
This commit is contained in:
Victor Song 2024-08-14 01:06:49 -05:00
parent fa00326247
commit b0f20c7deb
8 changed files with 33 additions and 173 deletions

View file

@ -13,7 +13,7 @@ use serde_json::from_value;
use span::Edition;
use toolchain::Tool;
use crate::{utf8_stdout, InvocationLocation, ManifestPath, Sysroot};
use crate::{utf8_stdout, ManifestPath, Sysroot};
use crate::{CfgOverrides, InvocationStrategy};
/// [`CargoWorkspace`] represents the logical structure of, well, a Cargo
@ -100,7 +100,6 @@ pub struct CargoConfig {
/// Extra env vars to set when invoking the cargo command
pub extra_env: FxHashMap<String, String>,
pub invocation_strategy: InvocationStrategy,
pub invocation_location: InvocationLocation,
/// Optional path to use instead of `target` when building
pub target_dir: Option<Utf8PathBuf>,
}