Implement BatchDatabase construction

This commit is contained in:
Florian Diebold 2019-02-09 13:06:12 +01:00
parent 15224dfcd5
commit 43e52ac9e2
5 changed files with 116 additions and 22 deletions

View file

@ -47,10 +47,8 @@ impl ServerWorldState {
roots.push(krate.root_dir(&ws.sysroot).to_path_buf())
}
}
roots.sort();
roots.dedup();
let roots_to_scan = roots.len();
let (mut vfs, roots) = Vfs::new(roots);
let roots_to_scan = roots.len();
for r in roots {
let is_local = vfs.root2path(r).starts_with(&root);
change.add_root(SourceRootId(r.0.into()), is_local);