From 00d927a1885ec2938d3365a8e136993445b437f5 Mon Sep 17 00:00:00 2001 From: David Wood Date: Tue, 5 Mar 2019 22:29:23 +0100 Subject: Initial implementation of project-lock.json. This commit adds a initial implementation of project-lock.json, a build system agnostic method of specifying the crate graph and roots. --- crates/ra_batch/src/lib.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'crates/ra_batch/src') diff --git a/crates/ra_batch/src/lib.rs b/crates/ra_batch/src/lib.rs index 89a234f4c..2db038063 100644 --- a/crates/ra_batch/src/lib.rs +++ b/crates/ra_batch/src/lib.rs @@ -99,12 +99,7 @@ impl BatchDatabase { let ws = ProjectWorkspace::discover(root.as_ref())?; let mut roots = Vec::new(); roots.push(root.clone()); - for pkg in ws.cargo.packages() { - roots.push(pkg.root(&ws.cargo).to_path_buf()); - } - for krate in ws.sysroot.crates() { - roots.push(krate.root_dir(&ws.sysroot).to_path_buf()) - } + ws.add_roots(&mut roots); let (mut vfs, roots) = Vfs::new(roots); let mut load = |path: &Path| { let vfs_file = vfs.load(path); -- cgit v1.2.3