diff options
author | Emil Lauridsen <[email protected]> | 2020-03-17 13:55:44 +0000 |
---|---|---|
committer | Emil Lauridsen <[email protected]> | 2020-03-17 13:55:44 +0000 |
commit | e154132c911be41b75e84d01de5c7efa4da9168e (patch) | |
tree | 343f031803bbf5b35c74bac3fee22c157be50a61 | |
parent | f84deffd72d28143bf95c91563121de9b41c76ae (diff) |
Remove outDirOverrides
-rw-r--r-- | crates/ra_project_model/src/cargo_workspace.rs | 8 | ||||
-rw-r--r-- | editors/code/package.json | 5 | ||||
-rw-r--r-- | editors/code/src/config.ts | 2 |
3 files changed, 0 insertions, 15 deletions
diff --git a/crates/ra_project_model/src/cargo_workspace.rs b/crates/ra_project_model/src/cargo_workspace.rs index 97fa48b8b..eeeb10233 100644 --- a/crates/ra_project_model/src/cargo_workspace.rs +++ b/crates/ra_project_model/src/cargo_workspace.rs | |||
@@ -39,9 +39,6 @@ pub struct CargoFeatures { | |||
39 | 39 | ||
40 | /// Runs cargo check on launch to figure out the correct values of OUT_DIR | 40 | /// Runs cargo check on launch to figure out the correct values of OUT_DIR |
41 | pub load_out_dirs_from_check: bool, | 41 | pub load_out_dirs_from_check: bool, |
42 | |||
43 | /// Fine grained controls for additional `OUT_DIR` env variables | ||
44 | pub out_dir_overrides: FxHashMap<PackageId, PathBuf>, | ||
45 | } | 42 | } |
46 | 43 | ||
47 | impl Default for CargoFeatures { | 44 | impl Default for CargoFeatures { |
@@ -51,7 +48,6 @@ impl Default for CargoFeatures { | |||
51 | all_features: true, | 48 | all_features: true, |
52 | features: Vec::new(), | 49 | features: Vec::new(), |
53 | load_out_dirs_from_check: false, | 50 | load_out_dirs_from_check: false, |
54 | out_dir_overrides: FxHashMap::default(), | ||
55 | } | 51 | } |
56 | } | 52 | } |
57 | } | 53 | } |
@@ -195,10 +191,6 @@ impl CargoWorkspace { | |||
195 | if cargo_features.load_out_dirs_from_check { | 191 | if cargo_features.load_out_dirs_from_check { |
196 | out_dir_by_id = load_out_dirs(cargo_toml, cargo_features); | 192 | out_dir_by_id = load_out_dirs(cargo_toml, cargo_features); |
197 | } | 193 | } |
198 | // We explicitly extend afterwards to allow overriding the value returned by cargo | ||
199 | out_dir_by_id.extend( | ||
200 | cargo_features.out_dir_overrides.iter().map(|(id, path)| (id.clone(), path.clone())), | ||
201 | ); | ||
202 | 194 | ||
203 | let mut pkg_by_id = FxHashMap::default(); | 195 | let mut pkg_by_id = FxHashMap::default(); |
204 | let mut packages = Arena::default(); | 196 | let mut packages = Arena::default(); |
diff --git a/editors/code/package.json b/editors/code/package.json index b4128acf0..b9e0ffd2b 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -362,11 +362,6 @@ | |||
362 | "type": "boolean", | 362 | "type": "boolean", |
363 | "default": false, | 363 | "default": false, |
364 | "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" | 364 | "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" |
365 | }, | ||
366 | "rust-analyzer.cargoFeatures.outDirOverrides": { | ||
367 | "type": "object", | ||
368 | "default": {}, | ||
369 | "markdownDescription": "Fine grained controls for OUT_DIR `env!(\"OUT_DIR\")` variable. e.g. `{\"foo 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)\":\"/path/to/foo\"}`, " | ||
370 | } | 365 | } |
371 | } | 366 | } |
372 | }, | 367 | }, |
diff --git a/editors/code/src/config.ts b/editors/code/src/config.ts index c7323f6e9..b45b14bef 100644 --- a/editors/code/src/config.ts +++ b/editors/code/src/config.ts | |||
@@ -23,7 +23,6 @@ export interface CargoFeatures { | |||
23 | allFeatures: boolean; | 23 | allFeatures: boolean; |
24 | features: string[]; | 24 | features: string[]; |
25 | loadOutDirsFromCheck: boolean; | 25 | loadOutDirsFromCheck: boolean; |
26 | outDirOverrides: Record<string, string>; | ||
27 | } | 26 | } |
28 | 27 | ||
29 | export const enum UpdatesChannel { | 28 | export const enum UpdatesChannel { |
@@ -222,7 +221,6 @@ export class Config { | |||
222 | allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, | 221 | allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, |
223 | features: this.cfg.get("cargoFeatures.features") as string[], | 222 | features: this.cfg.get("cargoFeatures.features") as string[], |
224 | loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean, | 223 | loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean, |
225 | outDirOverrides: this.cfg.get("cargoFeatures.outDirOverrides") as Record<string, string>, | ||
226 | }; | 224 | }; |
227 | } | 225 | } |
228 | 226 | ||