diff options
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r-- | crates/ra_ide_db/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/change.rs | 18 | ||||
-rw-r--r-- | crates/ra_ide_db/src/lib.rs | 14 | ||||
-rw-r--r-- | crates/ra_ide_db/src/search.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/source_change.rs | 2 | ||||
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 6 |
6 files changed, 22 insertions, 22 deletions
diff --git a/crates/ra_ide_db/Cargo.toml b/crates/ra_ide_db/Cargo.toml index 9ed13a13d..0cda7090d 100644 --- a/crates/ra_ide_db/Cargo.toml +++ b/crates/ra_ide_db/Cargo.toml | |||
@@ -23,7 +23,7 @@ stdx = { path = "../stdx" } | |||
23 | 23 | ||
24 | syntax = { path = "../syntax" } | 24 | syntax = { path = "../syntax" } |
25 | text_edit = { path = "../text_edit" } | 25 | text_edit = { path = "../text_edit" } |
26 | ra_db = { path = "../ra_db" } | 26 | base_db = { path = "../base_db" } |
27 | profile = { path = "../profile" } | 27 | profile = { path = "../profile" } |
28 | test_utils = { path = "../test_utils" } | 28 | test_utils = { path = "../test_utils" } |
29 | 29 | ||
diff --git a/crates/ra_ide_db/src/change.rs b/crates/ra_ide_db/src/change.rs index 7a4e04ca9..8b4fd7ab8 100644 --- a/crates/ra_ide_db/src/change.rs +++ b/crates/ra_ide_db/src/change.rs | |||
@@ -3,11 +3,11 @@ | |||
3 | 3 | ||
4 | use std::{fmt, sync::Arc, time}; | 4 | use std::{fmt, sync::Arc, time}; |
5 | 5 | ||
6 | use profile::{memory_usage, Bytes}; | 6 | use base_db::{ |
7 | use ra_db::{ | ||
8 | salsa::{Database, Durability, SweepStrategy}, | 7 | salsa::{Database, Durability, SweepStrategy}, |
9 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, | 8 | CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, |
10 | }; | 9 | }; |
10 | use profile::{memory_usage, Bytes}; | ||
11 | use rustc_hash::FxHashSet; | 11 | use rustc_hash::FxHashSet; |
12 | 12 | ||
13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; | 13 | use crate::{symbol_index::SymbolsDatabase, RootDatabase}; |
@@ -146,7 +146,7 @@ impl RootDatabase { | |||
146 | 146 | ||
147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); | 147 | let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); |
148 | 148 | ||
149 | ra_db::ParseQuery.in_db(self).sweep(sweep); | 149 | base_db::ParseQuery.in_db(self).sweep(sweep); |
150 | hir::db::ParseMacroQuery.in_db(self).sweep(sweep); | 150 | hir::db::ParseMacroQuery.in_db(self).sweep(sweep); |
151 | 151 | ||
152 | // Macros do take significant space, but less then the syntax trees | 152 | // Macros do take significant space, but less then the syntax trees |
@@ -201,14 +201,14 @@ impl RootDatabase { | |||
201 | } | 201 | } |
202 | sweep_each_query![ | 202 | sweep_each_query![ |
203 | // SourceDatabase | 203 | // SourceDatabase |
204 | ra_db::ParseQuery | 204 | base_db::ParseQuery |
205 | ra_db::CrateGraphQuery | 205 | base_db::CrateGraphQuery |
206 | 206 | ||
207 | // SourceDatabaseExt | 207 | // SourceDatabaseExt |
208 | ra_db::FileTextQuery | 208 | base_db::FileTextQuery |
209 | ra_db::FileSourceRootQuery | 209 | base_db::FileSourceRootQuery |
210 | ra_db::SourceRootQuery | 210 | base_db::SourceRootQuery |
211 | ra_db::SourceRootCratesQuery | 211 | base_db::SourceRootCratesQuery |
212 | 212 | ||
213 | // AstDatabase | 213 | // AstDatabase |
214 | hir::db::AstIdMapQuery | 214 | hir::db::AstIdMapQuery |
diff --git a/crates/ra_ide_db/src/lib.rs b/crates/ra_ide_db/src/lib.rs index 6900cac73..fd474cd0f 100644 --- a/crates/ra_ide_db/src/lib.rs +++ b/crates/ra_ide_db/src/lib.rs | |||
@@ -13,19 +13,19 @@ mod wasm_shims; | |||
13 | 13 | ||
14 | use std::{fmt, sync::Arc}; | 14 | use std::{fmt, sync::Arc}; |
15 | 15 | ||
16 | use hir::db::{AstDatabase, DefDatabase, HirDatabase}; | 16 | use base_db::{ |
17 | use ra_db::{ | ||
18 | salsa::{self, Durability}, | 17 | salsa::{self, Durability}, |
19 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, | 18 | Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, |
20 | Upcast, | 19 | Upcast, |
21 | }; | 20 | }; |
21 | use hir::db::{AstDatabase, DefDatabase, HirDatabase}; | ||
22 | use rustc_hash::FxHashSet; | 22 | use rustc_hash::FxHashSet; |
23 | 23 | ||
24 | use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; | 24 | use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; |
25 | 25 | ||
26 | #[salsa::database( | 26 | #[salsa::database( |
27 | ra_db::SourceDatabaseStorage, | 27 | base_db::SourceDatabaseStorage, |
28 | ra_db::SourceDatabaseExtStorage, | 28 | base_db::SourceDatabaseExtStorage, |
29 | LineIndexDatabaseStorage, | 29 | LineIndexDatabaseStorage, |
30 | symbol_index::SymbolsDatabaseStorage, | 30 | symbol_index::SymbolsDatabaseStorage, |
31 | hir::db::InternDatabaseStorage, | 31 | hir::db::InternDatabaseStorage, |
@@ -111,8 +111,8 @@ impl RootDatabase { | |||
111 | } | 111 | } |
112 | 112 | ||
113 | pub fn update_lru_capacity(&mut self, lru_capacity: Option<usize>) { | 113 | pub fn update_lru_capacity(&mut self, lru_capacity: Option<usize>) { |
114 | let lru_capacity = lru_capacity.unwrap_or(ra_db::DEFAULT_LRU_CAP); | 114 | let lru_capacity = lru_capacity.unwrap_or(base_db::DEFAULT_LRU_CAP); |
115 | ra_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity); | 115 | base_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity); |
116 | hir::db::ParseMacroQuery.in_db_mut(self).set_lru_capacity(lru_capacity); | 116 | hir::db::ParseMacroQuery.in_db_mut(self).set_lru_capacity(lru_capacity); |
117 | hir::db::MacroExpandQuery.in_db_mut(self).set_lru_capacity(lru_capacity); | 117 | hir::db::MacroExpandQuery.in_db_mut(self).set_lru_capacity(lru_capacity); |
118 | } | 118 | } |
@@ -129,7 +129,7 @@ impl salsa::ParallelDatabase for RootDatabase { | |||
129 | } | 129 | } |
130 | 130 | ||
131 | #[salsa::query_group(LineIndexDatabaseStorage)] | 131 | #[salsa::query_group(LineIndexDatabaseStorage)] |
132 | pub trait LineIndexDatabase: ra_db::SourceDatabase + CheckCanceled { | 132 | pub trait LineIndexDatabase: base_db::SourceDatabase + CheckCanceled { |
133 | fn line_index(&self, file_id: FileId) -> Arc<LineIndex>; | 133 | fn line_index(&self, file_id: FileId) -> Arc<LineIndex>; |
134 | } | 134 | } |
135 | 135 | ||
diff --git a/crates/ra_ide_db/src/search.rs b/crates/ra_ide_db/src/search.rs index 7827cc71c..b9360bf12 100644 --- a/crates/ra_ide_db/src/search.rs +++ b/crates/ra_ide_db/src/search.rs | |||
@@ -6,9 +6,9 @@ | |||
6 | 6 | ||
7 | use std::{convert::TryInto, mem}; | 7 | use std::{convert::TryInto, mem}; |
8 | 8 | ||
9 | use base_db::{FileId, FileRange, SourceDatabaseExt}; | ||
9 | use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility}; | 10 | use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility}; |
10 | use once_cell::unsync::Lazy; | 11 | use once_cell::unsync::Lazy; |
11 | use ra_db::{FileId, FileRange, SourceDatabaseExt}; | ||
12 | use rustc_hash::FxHashMap; | 12 | use rustc_hash::FxHashMap; |
13 | use syntax::{ast, match_ast, AstNode, TextRange, TextSize}; | 13 | use syntax::{ast, match_ast, AstNode, TextRange, TextSize}; |
14 | 14 | ||
diff --git a/crates/ra_ide_db/src/source_change.rs b/crates/ra_ide_db/src/source_change.rs index ae21132dd..f1590ec66 100644 --- a/crates/ra_ide_db/src/source_change.rs +++ b/crates/ra_ide_db/src/source_change.rs | |||
@@ -3,7 +3,7 @@ | |||
3 | //! | 3 | //! |
4 | //! It can be viewed as a dual for `AnalysisChange`. | 4 | //! It can be viewed as a dual for `AnalysisChange`. |
5 | 5 | ||
6 | use ra_db::FileId; | 6 | use base_db::FileId; |
7 | use text_edit::TextEdit; | 7 | use text_edit::TextEdit; |
8 | 8 | ||
9 | #[derive(Default, Debug, Clone)] | 9 | #[derive(Default, Debug, Clone)] |
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 896092b46..654df898e 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs | |||
@@ -28,12 +28,12 @@ use std::{ | |||
28 | sync::Arc, | 28 | sync::Arc, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | use fst::{self, Streamer}; | 31 | use base_db::{ |
32 | use hir::db::DefDatabase; | ||
33 | use ra_db::{ | ||
34 | salsa::{self, ParallelDatabase}, | 32 | salsa::{self, ParallelDatabase}, |
35 | CrateId, FileId, SourceDatabaseExt, SourceRootId, | 33 | CrateId, FileId, SourceDatabaseExt, SourceRootId, |
36 | }; | 34 | }; |
35 | use fst::{self, Streamer}; | ||
36 | use hir::db::DefDatabase; | ||
37 | use rayon::prelude::*; | 37 | use rayon::prelude::*; |
38 | use rustc_hash::{FxHashMap, FxHashSet}; | 38 | use rustc_hash::{FxHashMap, FxHashSet}; |
39 | use syntax::{ | 39 | use syntax::{ |