Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/project-model/src/cargo_workspace.rs')
| -rw-r--r-- | crates/project-model/src/cargo_workspace.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/crates/project-model/src/cargo_workspace.rs b/crates/project-model/src/cargo_workspace.rs index 971193229a..d304c9762c 100644 --- a/crates/project-model/src/cargo_workspace.rs +++ b/crates/project-model/src/cargo_workspace.rs @@ -108,7 +108,10 @@ pub struct CargoConfig { pub invocation_strategy: InvocationStrategy, /// Optional path to use instead of `target` when building pub target_dir: Option<Utf8PathBuf>, + /// Gate `#[test]` behind `#[cfg(test)]` pub set_test: bool, + /// Load the project without any dependencies + pub no_deps: bool, } pub type Package = Idx<PackageData>; @@ -308,6 +311,7 @@ impl CargoWorkspace { current_dir: &AbsPath, config: &CargoMetadataConfig, sysroot: &Sysroot, + no_deps: bool, locked: bool, progress: &dyn Fn(String), ) -> anyhow::Result<(cargo_metadata::Metadata, Option<anyhow::Error>)> { @@ -316,8 +320,8 @@ impl CargoWorkspace { current_dir, config, sysroot, + no_deps, locked, - false, progress, ); if let Ok((_, Some(ref e))) = res { @@ -335,8 +339,8 @@ impl CargoWorkspace { current_dir: &AbsPath, config: &CargoMetadataConfig, sysroot: &Sysroot, - locked: bool, no_deps: bool, + locked: bool, progress: &dyn Fn(String), ) -> anyhow::Result<(cargo_metadata::Metadata, Option<anyhow::Error>)> { let cargo = sysroot.tool(Tool::Cargo, current_dir); |