From ed20a857f485a471369cd99b843af19a4d875ad0 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 13 Aug 2020 16:25:38 +0200 Subject: Rename ra_db -> base_db --- crates/ra_ide_db/src/change.rs | 18 +++++++++--------- crates/ra_ide_db/src/lib.rs | 14 +++++++------- crates/ra_ide_db/src/search.rs | 2 +- crates/ra_ide_db/src/source_change.rs | 2 +- crates/ra_ide_db/src/symbol_index.rs | 6 +++--- 5 files changed, 21 insertions(+), 21 deletions(-) (limited to 'crates/ra_ide_db/src') 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 @@ use std::{fmt, sync::Arc, time}; -use profile::{memory_usage, Bytes}; -use ra_db::{ +use base_db::{ salsa::{Database, Durability, SweepStrategy}, CrateGraph, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId, }; +use profile::{memory_usage, Bytes}; use rustc_hash::FxHashSet; use crate::{symbol_index::SymbolsDatabase, RootDatabase}; @@ -146,7 +146,7 @@ impl RootDatabase { let sweep = SweepStrategy::default().discard_values().sweep_all_revisions(); - ra_db::ParseQuery.in_db(self).sweep(sweep); + base_db::ParseQuery.in_db(self).sweep(sweep); hir::db::ParseMacroQuery.in_db(self).sweep(sweep); // Macros do take significant space, but less then the syntax trees @@ -201,14 +201,14 @@ impl RootDatabase { } sweep_each_query![ // SourceDatabase - ra_db::ParseQuery - ra_db::CrateGraphQuery + base_db::ParseQuery + base_db::CrateGraphQuery // SourceDatabaseExt - ra_db::FileTextQuery - ra_db::FileSourceRootQuery - ra_db::SourceRootQuery - ra_db::SourceRootCratesQuery + base_db::FileTextQuery + base_db::FileSourceRootQuery + base_db::SourceRootQuery + base_db::SourceRootCratesQuery // AstDatabase 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; use std::{fmt, sync::Arc}; -use hir::db::{AstDatabase, DefDatabase, HirDatabase}; -use ra_db::{ +use base_db::{ salsa::{self, Durability}, Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast, }; +use hir::db::{AstDatabase, DefDatabase, HirDatabase}; use rustc_hash::FxHashSet; use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase}; #[salsa::database( - ra_db::SourceDatabaseStorage, - ra_db::SourceDatabaseExtStorage, + base_db::SourceDatabaseStorage, + base_db::SourceDatabaseExtStorage, LineIndexDatabaseStorage, symbol_index::SymbolsDatabaseStorage, hir::db::InternDatabaseStorage, @@ -111,8 +111,8 @@ impl RootDatabase { } pub fn update_lru_capacity(&mut self, lru_capacity: Option) { - let lru_capacity = lru_capacity.unwrap_or(ra_db::DEFAULT_LRU_CAP); - ra_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity); + let lru_capacity = lru_capacity.unwrap_or(base_db::DEFAULT_LRU_CAP); + base_db::ParseQuery.in_db_mut(self).set_lru_capacity(lru_capacity); hir::db::ParseMacroQuery.in_db_mut(self).set_lru_capacity(lru_capacity); hir::db::MacroExpandQuery.in_db_mut(self).set_lru_capacity(lru_capacity); } @@ -129,7 +129,7 @@ impl salsa::ParallelDatabase for RootDatabase { } #[salsa::query_group(LineIndexDatabaseStorage)] -pub trait LineIndexDatabase: ra_db::SourceDatabase + CheckCanceled { +pub trait LineIndexDatabase: base_db::SourceDatabase + CheckCanceled { fn line_index(&self, file_id: FileId) -> Arc; } 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 @@ use std::{convert::TryInto, mem}; +use base_db::{FileId, FileRange, SourceDatabaseExt}; use hir::{DefWithBody, HasSource, Module, ModuleSource, Semantics, Visibility}; use once_cell::unsync::Lazy; -use ra_db::{FileId, FileRange, SourceDatabaseExt}; use rustc_hash::FxHashMap; use syntax::{ast, match_ast, AstNode, TextRange, TextSize}; 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 @@ //! //! It can be viewed as a dual for `AnalysisChange`. -use ra_db::FileId; +use base_db::FileId; use text_edit::TextEdit; #[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::{ sync::Arc, }; -use fst::{self, Streamer}; -use hir::db::DefDatabase; -use ra_db::{ +use base_db::{ salsa::{self, ParallelDatabase}, CrateId, FileId, SourceDatabaseExt, SourceRootId, }; +use fst::{self, Streamer}; +use hir::db::DefDatabase; use rayon::prelude::*; use rustc_hash::{FxHashMap, FxHashSet}; use syntax::{ -- cgit v1.2.3