Remove outDirOverrides

This commit is contained in:
Emil Lauridsen 2020-03-17 14:55:44 +01:00
parent f84deffd72
commit e154132c91
3 changed files with 0 additions and 15 deletions

View file

@ -39,9 +39,6 @@ pub struct CargoFeatures {
/// Runs cargo check on launch to figure out the correct values of OUT_DIR /// Runs cargo check on launch to figure out the correct values of OUT_DIR
pub load_out_dirs_from_check: bool, pub load_out_dirs_from_check: bool,
/// Fine grained controls for additional `OUT_DIR` env variables
pub out_dir_overrides: FxHashMap<PackageId, PathBuf>,
} }
impl Default for CargoFeatures { impl Default for CargoFeatures {
@ -51,7 +48,6 @@ impl Default for CargoFeatures {
all_features: true, all_features: true,
features: Vec::new(), features: Vec::new(),
load_out_dirs_from_check: false, load_out_dirs_from_check: false,
out_dir_overrides: FxHashMap::default(),
} }
} }
} }
@ -195,10 +191,6 @@ impl CargoWorkspace {
if cargo_features.load_out_dirs_from_check { if cargo_features.load_out_dirs_from_check {
out_dir_by_id = load_out_dirs(cargo_toml, cargo_features); out_dir_by_id = load_out_dirs(cargo_toml, cargo_features);
} }
// We explicitly extend afterwards to allow overriding the value returned by cargo
out_dir_by_id.extend(
cargo_features.out_dir_overrides.iter().map(|(id, path)| (id.clone(), path.clone())),
);
let mut pkg_by_id = FxHashMap::default(); let mut pkg_by_id = FxHashMap::default();
let mut packages = Arena::default(); let mut packages = Arena::default();

View file

@ -362,11 +362,6 @@
"type": "boolean", "type": "boolean",
"default": false, "default": false,
"markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs" "markdownDescription": "Run `cargo check` on startup to get the correct value for package OUT_DIRs"
},
"rust-analyzer.cargoFeatures.outDirOverrides": {
"type": "object",
"default": {},
"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\"}`, "
} }
} }
}, },

View file

@ -23,7 +23,6 @@ export interface CargoFeatures {
allFeatures: boolean; allFeatures: boolean;
features: string[]; features: string[];
loadOutDirsFromCheck: boolean; loadOutDirsFromCheck: boolean;
outDirOverrides: Record<string, string>;
} }
export const enum UpdatesChannel { export const enum UpdatesChannel {
@ -222,7 +221,6 @@ export class Config {
allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean, allFeatures: this.cfg.get("cargoFeatures.allFeatures") as boolean,
features: this.cfg.get("cargoFeatures.features") as string[], features: this.cfg.get("cargoFeatures.features") as string[],
loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean, loadOutDirsFromCheck: this.cfg.get("cargoFeatures.loadOutDirsFromCheck") as boolean,
outDirOverrides: this.cfg.get("cargoFeatures.outDirOverrides") as Record<string, string>,
}; };
} }