@@ -80,13 +80,6 @@ config_data! {
80
80
pub ( crate ) cargo_autoreload: bool = true ,
81
81
/// Run build scripts (`build.rs`) for more precise code analysis.
82
82
cargo_buildScripts_enable: bool = true ,
83
- /// Specifies the working directory for running build scripts.
84
- /// - "workspace": run build scripts for a workspace in the workspace's root directory.
85
- /// This is incompatible with `#rust-analyzer.cargo.buildScripts.invocationStrategy#` set to `once`.
86
- /// - "root": run build scripts in the project's root directory.
87
- /// This config only has an effect when `#rust-analyzer.cargo.buildScripts.overrideCommand#`
88
- /// is set.
89
- cargo_buildScripts_invocationLocation: InvocationLocation = InvocationLocation :: Workspace ,
90
83
/// Specifies the invocation strategy to use when running the build scripts command.
91
84
/// If `per_workspace` is set, the command will be executed for each workspace.
92
85
/// If `once` is set, the command will be executed once.
@@ -101,8 +94,7 @@ config_data! {
101
94
/// If there are multiple linked projects/workspaces, this command is invoked for
102
95
/// each of them, with the working directory being the workspace root
103
96
/// (i.e., the folder containing the `Cargo.toml`). This can be overwritten
104
- /// by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#` and
105
- /// `#rust-analyzer.cargo.buildScripts.invocationLocation#`.
97
+ /// by changing `#rust-analyzer.cargo.buildScripts.invocationStrategy#`.
106
98
///
107
99
/// By default, a cargo invocation will be constructed for the configured
108
100
/// targets and features, with the following base command line:
@@ -182,14 +174,6 @@ config_data! {
182
174
///
183
175
/// For example for `cargo check`: `dead_code`, `unused_imports`, `unused_variables`,...
184
176
check_ignore: FxHashSet <String > = FxHashSet :: default ( ) ,
185
- /// Specifies the working directory for running checks.
186
- /// - "workspace": run checks for workspaces in the corresponding workspaces' root directories.
187
- // FIXME: Ideally we would support this in some way
188
- /// This falls back to "root" if `#rust-analyzer.check.invocationStrategy#` is set to `once`.
189
- /// - "root": run checks in the project's root directory.
190
- /// This config only has an effect when `#rust-analyzer.check.overrideCommand#`
191
- /// is set.
192
- check_invocationLocation | checkOnSave_invocationLocation: InvocationLocation = InvocationLocation :: Workspace ,
193
177
/// Specifies the invocation strategy to use when running the check command.
194
178
/// If `per_workspace` is set, the command will be executed for each workspace.
195
179
/// If `once` is set, the command will be executed once.
@@ -212,8 +196,7 @@ config_data! {
212
196
/// If there are multiple linked projects/workspaces, this command is invoked for
213
197
/// each of them, with the working directory being the workspace root
214
198
/// (i.e., the folder containing the `Cargo.toml`). This can be overwritten
215
- /// by changing `#rust-analyzer.check.invocationStrategy#` and
216
- /// `#rust-analyzer.check.invocationLocation#`.
199
+ /// by changing `#rust-analyzer.check.invocationStrategy#`.
217
200
///
218
201
/// If `$saved_file` is part of the command, rust-analyzer will pass
219
202
/// the absolute path of the saved file to the provided command. This is
@@ -1868,12 +1851,6 @@ impl Config {
1868
1851
InvocationStrategy :: Once => project_model:: InvocationStrategy :: Once ,
1869
1852
InvocationStrategy :: PerWorkspace => project_model:: InvocationStrategy :: PerWorkspace ,
1870
1853
} ,
1871
- invocation_location : match self . cargo_buildScripts_invocationLocation ( None ) {
1872
- InvocationLocation :: Root => {
1873
- project_model:: InvocationLocation :: Root ( self . root_path . clone ( ) )
1874
- }
1875
- InvocationLocation :: Workspace => project_model:: InvocationLocation :: Workspace ,
1876
- } ,
1877
1854
run_build_script_command : self . cargo_buildScripts_overrideCommand ( None ) . clone ( ) ,
1878
1855
extra_args : self . cargo_extraArgs ( None ) . clone ( ) ,
1879
1856
extra_env : self . cargo_extraEnv ( None ) . clone ( ) ,
@@ -1930,14 +1907,6 @@ impl Config {
1930
1907
crate :: flycheck:: InvocationStrategy :: PerWorkspace
1931
1908
}
1932
1909
} ,
1933
- invocation_location : match self . check_invocationLocation ( None ) {
1934
- InvocationLocation :: Root => {
1935
- crate :: flycheck:: InvocationLocation :: Root ( self . root_path . clone ( ) )
1936
- }
1937
- InvocationLocation :: Workspace => {
1938
- crate :: flycheck:: InvocationLocation :: Workspace
1939
- }
1940
- } ,
1941
1910
}
1942
1911
}
1943
1912
Some ( _) | None => FlycheckConfig :: CargoCommand {
@@ -2348,13 +2317,6 @@ pub(crate) enum InvocationStrategy {
2348
2317
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
2349
2318
struct CheckOnSaveTargets ( #[ serde( with = "single_or_array" ) ] Vec < String > ) ;
2350
2319
2351
- #[ derive( Serialize , Deserialize , Debug , Clone ) ]
2352
- #[ serde( rename_all = "snake_case" ) ]
2353
- enum InvocationLocation {
2354
- Root ,
2355
- Workspace ,
2356
- }
2357
-
2358
2320
#[ derive( Serialize , Deserialize , Debug , Clone ) ]
2359
2321
#[ serde( rename_all = "snake_case" ) ]
2360
2322
enum LifetimeElisionDef {
@@ -3196,14 +3158,6 @@ fn field_props(field: &str, ty: &str, doc: &[&str], default: &str) -> serde_json
3196
3158
"The command will be executed once."
3197
3159
] ,
3198
3160
} ,
3199
- "InvocationLocation" => set ! {
3200
- "type" : "string" ,
3201
- "enum" : [ "workspace" , "root" ] ,
3202
- "enumDescriptions" : [
3203
- "The command will be executed in the corresponding workspace root." ,
3204
- "The command will be executed in the project root."
3205
- ] ,
3206
- } ,
3207
3161
"Option<CheckOnSaveTargets>" => set ! {
3208
3162
"anyOf" : [
3209
3163
{
0 commit comments