aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_db
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-08-13 15:31:49 +0100
committerGitHub <[email protected]>2020-08-13 15:31:49 +0100
commite9926948ca267932ccc1341388bfd1b3fa88a001 (patch)
treecc4b797cb39a40b59e9e3d37178e8a1907f12358 /crates/ra_ide_db
parent902f74c2697cc2a50de9067845814a2a852fccfd (diff)
parent50f8c1ebf23f634b68529603a917e3feeda457fa (diff)
Merge #5747
5747: Rename crate r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_db')
-rw-r--r--crates/ra_ide_db/Cargo.toml2
-rw-r--r--crates/ra_ide_db/src/change.rs18
-rw-r--r--crates/ra_ide_db/src/lib.rs14
-rw-r--r--crates/ra_ide_db/src/search.rs2
-rw-r--r--crates/ra_ide_db/src/source_change.rs2
-rw-r--r--crates/ra_ide_db/src/symbol_index.rs6
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
24syntax = { path = "../syntax" } 24syntax = { path = "../syntax" }
25text_edit = { path = "../text_edit" } 25text_edit = { path = "../text_edit" }
26ra_db = { path = "../ra_db" } 26base_db = { path = "../base_db" }
27profile = { path = "../profile" } 27profile = { path = "../profile" }
28test_utils = { path = "../test_utils" } 28test_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
4use std::{fmt, sync::Arc, time}; 4use std::{fmt, sync::Arc, time};
5 5
6use profile::{memory_usage, Bytes}; 6use base_db::{
7use 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};
10use profile::{memory_usage, Bytes};
11use rustc_hash::FxHashSet; 11use rustc_hash::FxHashSet;
12 12
13use crate::{symbol_index::SymbolsDatabase, RootDatabase}; 13use 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
14use std::{fmt, sync::Arc}; 14use std::{fmt, sync::Arc};
15 15
16use hir::db::{AstDatabase, DefDatabase, HirDatabase}; 16use base_db::{
17use 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};
21use hir::db::{AstDatabase, DefDatabase, HirDatabase};
22use rustc_hash::FxHashSet; 22use rustc_hash::FxHashSet;
23 23
24use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; 24use 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)]
132pub trait LineIndexDatabase: ra_db::SourceDatabase + CheckCanceled { 132pub 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
7use std::{convert::TryInto, mem}; 7use std::{convert::TryInto, mem};
8 8
9use base_db::{FileId, FileRange, SourceDatabaseExt};
9use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility}; 10use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility};
10use once_cell::unsync::Lazy; 11use once_cell::unsync::Lazy;
11use ra_db::{FileId, FileRange, SourceDatabaseExt};
12use rustc_hash::FxHashMap; 12use rustc_hash::FxHashMap;
13use syntax::{ast, match_ast, AstNode, TextRange, TextSize}; 13use 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
6use ra_db::FileId; 6use base_db::FileId;
7use text_edit::TextEdit; 7use 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
31use fst::{self, Streamer}; 31use base_db::{
32use hir::db::DefDatabase;
33use ra_db::{
34 salsa::{self, ParallelDatabase}, 32 salsa::{self, ParallelDatabase},
35 CrateId, FileId, SourceDatabaseExt, SourceRootId, 33 CrateId, FileId, SourceDatabaseExt, SourceRootId,
36}; 34};
35use fst::{self, Streamer};
36use hir::db::DefDatabase;
37use rayon::prelude::*; 37use rayon::prelude::*;
38use rustc_hash::{FxHashMap, FxHashSet}; 38use rustc_hash::{FxHashMap, FxHashSet};
39use syntax::{ 39use syntax::{