aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_batch
diff options
context:
space:
mode:
authorDavid Wood <[email protected]>2019-03-05 21:29:23 +0000
committerDavid Wood <[email protected]>2019-03-07 00:05:03 +0000
commit00d927a1885ec2938d3365a8e136993445b437f5 (patch)
treee60f63e68def477d5b7ceb39dcc965ff128d6e19 /crates/ra_batch
parentb1a1d20e067c25fb80fbab43b2956b6747a8dd3c (diff)
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.
Diffstat (limited to 'crates/ra_batch')
-rw-r--r--crates/ra_batch/src/lib.rs7
1 files changed, 1 insertions, 6 deletions
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 {
99 let ws = ProjectWorkspace::discover(root.as_ref())?; 99 let ws = ProjectWorkspace::discover(root.as_ref())?;
100 let mut roots = Vec::new(); 100 let mut roots = Vec::new();
101 roots.push(root.clone()); 101 roots.push(root.clone());
102 for pkg in ws.cargo.packages() { 102 ws.add_roots(&mut roots);
103 roots.push(pkg.root(&ws.cargo).to_path_buf());
104 }
105 for krate in ws.sysroot.crates() {
106 roots.push(krate.root_dir(&ws.sysroot).to_path_buf())
107 }
108 let (mut vfs, roots) = Vfs::new(roots); 103 let (mut vfs, roots) = Vfs::new(roots);
109 let mut load = |path: &Path| { 104 let mut load = |path: &Path| {
110 let vfs_file = vfs.load(path); 105 let vfs_file = vfs.load(path);