From e6465e7e2a7e136edd652d5f4c93b961dd652cbc Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Dec 2018 16:13:16 +0300 Subject: index all local crates --- crates/ra_db/src/input.rs | 10 ++++++---- crates/ra_db/src/lib.rs | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'crates/ra_db') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index 51daa8e86..cccf37cc2 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -8,8 +8,6 @@ use salsa; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct SourceRootId(pub u32); -pub const WORKSPACE: SourceRootId = SourceRootId(0); - #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub struct FileId(pub u32); @@ -102,8 +100,12 @@ salsa::query_group! { type SourceRootQuery; storage input; } - fn libraries() -> Arc> { - type LibrariesQuery; + fn local_roots() -> Arc> { + type LocalRootsQuery; + storage input; + } + fn library_roots() -> Arc> { + type LibraryRootsQuery; storage input; } fn crate_graph() -> Arc { diff --git a/crates/ra_db/src/lib.rs b/crates/ra_db/src/lib.rs index eeb305b1b..65fa3cbfa 100644 --- a/crates/ra_db/src/lib.rs +++ b/crates/ra_db/src/lib.rs @@ -24,8 +24,8 @@ impl std::error::Error for Canceled {} pub use crate::{ syntax_ptr::LocalSyntaxPtr, input::{ - FilesDatabase, FileId, CrateId, SourceRoot, SourceRootId, CrateGraph, WORKSPACE, - FileTextQuery, FileSourceRootQuery, SourceRootQuery, LibrariesQuery, CrateGraphQuery, + FilesDatabase, FileId, CrateId, SourceRoot, SourceRootId, CrateGraph, + FileTextQuery, FileSourceRootQuery, SourceRootQuery, LocalRootsQuery, LibraryRootsQuery, CrateGraphQuery, FileRelativePathQuery }, loc2id::{LocationIntener, NumericId}, -- cgit v1.2.3