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/Cargo.toml | 2 +- crates/ra_ide/src/call_hierarchy.rs | 2 +- crates/ra_ide/src/completion/completion_context.rs | 2 +- crates/ra_ide/src/diagnostics.rs | 2 +- crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs | 2 +- crates/ra_ide/src/display/navigation_target.rs | 2 +- crates/ra_ide/src/goto_definition.rs | 2 +- crates/ra_ide/src/goto_implementation.rs | 2 +- crates/ra_ide/src/goto_type_definition.rs | 2 +- crates/ra_ide/src/hover.rs | 4 ++-- crates/ra_ide/src/lib.rs | 10 +++++----- crates/ra_ide/src/mock_analysis.rs | 2 +- crates/ra_ide/src/parent_module.rs | 4 ++-- crates/ra_ide/src/references/rename.rs | 2 +- crates/ra_ide/src/ssr.rs | 2 +- crates/ra_ide/src/status.rs | 8 ++++---- crates/ra_ide/src/syntax_highlighting/html.rs | 2 +- crates/ra_ide/src/syntax_tree.rs | 2 +- crates/ra_ide/src/typing.rs | 2 +- crates/ra_ide/src/typing/on_enter.rs | 2 +- 20 files changed, 29 insertions(+), 29 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/Cargo.toml b/crates/ra_ide/Cargo.toml index 938398a41..1af51f3ae 100644 --- a/crates/ra_ide/Cargo.toml +++ b/crates/ra_ide/Cargo.toml @@ -23,7 +23,7 @@ stdx = { path = "../stdx" } syntax = { path = "../syntax" } text_edit = { path = "../text_edit" } -ra_db = { path = "../ra_db" } +base_db = { path = "../base_db" } ra_ide_db = { path = "../ra_ide_db" } cfg = { path = "../cfg" } profile = { path = "../profile" } diff --git a/crates/ra_ide/src/call_hierarchy.rs b/crates/ra_ide/src/call_hierarchy.rs index 116e6bf83..3578b8d3c 100644 --- a/crates/ra_ide/src/call_hierarchy.rs +++ b/crates/ra_ide/src/call_hierarchy.rs @@ -137,7 +137,7 @@ impl CallLocations { #[cfg(test)] mod tests { - use ra_db::FilePosition; + use base_db::FilePosition; use crate::mock_analysis::analysis_and_position; diff --git a/crates/ra_ide/src/completion/completion_context.rs b/crates/ra_ide/src/completion/completion_context.rs index b5efb6cd6..0e0a201d0 100644 --- a/crates/ra_ide/src/completion/completion_context.rs +++ b/crates/ra_ide/src/completion/completion_context.rs @@ -1,7 +1,7 @@ //! FIXME: write short doc here +use base_db::SourceDatabase; use hir::{Semantics, SemanticsScope, Type}; -use ra_db::SourceDatabase; use ra_ide_db::RootDatabase; use syntax::{ algo::{find_covering_element, find_node_at_offset}, diff --git a/crates/ra_ide/src/diagnostics.rs b/crates/ra_ide/src/diagnostics.rs index 18def6115..4e59e3a48 100644 --- a/crates/ra_ide/src/diagnostics.rs +++ b/crates/ra_ide/src/diagnostics.rs @@ -6,9 +6,9 @@ use std::cell::RefCell; +use base_db::SourceDatabase; use hir::{diagnostics::DiagnosticSinkBuilder, Semantics}; use itertools::Itertools; -use ra_db::SourceDatabase; use ra_ide_db::RootDatabase; use syntax::{ ast::{self, AstNode}, diff --git a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs index efcd631b3..7e126d7a6 100644 --- a/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs +++ b/crates/ra_ide/src/diagnostics/diagnostics_with_fix.rs @@ -2,12 +2,12 @@ //! The same module also has all curret custom fixes for the diagnostics implemented. use crate::Fix; use ast::{edit::IndentLevel, make}; +use base_db::FileId; use hir::{ db::AstDatabase, diagnostics::{Diagnostic, MissingFields, MissingOkInTailExpr, NoSuchField, UnresolvedModule}, HasSource, HirDisplay, Semantics, VariantDef, }; -use ra_db::FileId; use ra_ide_db::{ source_change::{FileSystemEdit, SourceFileEdit}, RootDatabase, diff --git a/crates/ra_ide/src/display/navigation_target.rs b/crates/ra_ide/src/display/navigation_target.rs index 683088a74..09ec3f65e 100644 --- a/crates/ra_ide/src/display/navigation_target.rs +++ b/crates/ra_ide/src/display/navigation_target.rs @@ -1,8 +1,8 @@ //! FIXME: write short doc here +use base_db::{FileId, SourceDatabase}; use either::Either; use hir::{original_range, AssocItem, FieldSource, HasSource, InFile, ModuleSource}; -use ra_db::{FileId, SourceDatabase}; use ra_ide_db::{defs::Definition, RootDatabase}; use syntax::{ ast::{self, DocCommentsOwner, NameOwner}, diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs index 77f374ea2..b93d116bf 100644 --- a/crates/ra_ide/src/goto_definition.rs +++ b/crates/ra_ide/src/goto_definition.rs @@ -100,7 +100,7 @@ pub(crate) fn reference_definition( #[cfg(test)] mod tests { - use ra_db::FileRange; + use base_db::FileRange; use syntax::{TextRange, TextSize}; use crate::mock_analysis::MockAnalysis; diff --git a/crates/ra_ide/src/goto_implementation.rs b/crates/ra_ide/src/goto_implementation.rs index 91a8c1dd1..6dc2ccfd0 100644 --- a/crates/ra_ide/src/goto_implementation.rs +++ b/crates/ra_ide/src/goto_implementation.rs @@ -74,7 +74,7 @@ fn impls_for_trait( #[cfg(test)] mod tests { - use ra_db::FileRange; + use base_db::FileRange; use crate::mock_analysis::MockAnalysis; diff --git a/crates/ra_ide/src/goto_type_definition.rs b/crates/ra_ide/src/goto_type_definition.rs index 3ec2ee59d..8017ca58c 100644 --- a/crates/ra_ide/src/goto_type_definition.rs +++ b/crates/ra_ide/src/goto_type_definition.rs @@ -54,7 +54,7 @@ fn pick_best(tokens: TokenAtOffset) -> Option { #[cfg(test)] mod tests { - use ra_db::FileRange; + use base_db::FileRange; use crate::mock_analysis::MockAnalysis; diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs index 37e68ff7a..a74087f87 100644 --- a/crates/ra_ide/src/hover.rs +++ b/crates/ra_ide/src/hover.rs @@ -1,9 +1,9 @@ +use base_db::SourceDatabase; use hir::{ Adt, AsAssocItem, AssocItemContainer, Documentation, FieldSource, HasSource, HirDisplay, Module, ModuleDef, ModuleSource, Semantics, }; use itertools::Itertools; -use ra_db::SourceDatabase; use ra_ide_db::{ defs::{classify_name, classify_name_ref, Definition}, RootDatabase, @@ -352,8 +352,8 @@ fn pick_best(tokens: TokenAtOffset) -> Option { #[cfg(test)] mod tests { + use base_db::FileLoader; use expect::{expect, Expect}; - use ra_db::FileLoader; use crate::mock_analysis::analysis_and_position; diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs index 1fdf17800..789fbdaf2 100644 --- a/crates/ra_ide/src/lib.rs +++ b/crates/ra_ide/src/lib.rs @@ -47,11 +47,11 @@ mod typing; use std::sync::Arc; -use cfg::CfgOptions; -use ra_db::{ +use base_db::{ salsa::{self, ParallelDatabase}, CheckCanceled, Env, FileLoader, FileSet, SourceDatabase, VfsPath, }; +use cfg::CfgOptions; use ra_ide_db::{ symbol_index::{self, FileSymbol}, LineIndexDatabase, @@ -81,12 +81,12 @@ pub use crate::{ }, }; -pub use hir::{Documentation, Semantics}; -pub use ra_assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist}; -pub use ra_db::{ +pub use base_db::{ Canceled, CrateGraph, CrateId, Edition, FileId, FilePosition, FileRange, SourceRoot, SourceRootId, }; +pub use hir::{Documentation, Semantics}; +pub use ra_assists::{Assist, AssistConfig, AssistId, AssistKind, ResolvedAssist}; pub use ra_ide_db::{ change::AnalysisChange, line_index::{LineCol, LineIndex}, diff --git a/crates/ra_ide/src/mock_analysis.rs b/crates/ra_ide/src/mock_analysis.rs index a4691f028..363e6d27e 100644 --- a/crates/ra_ide/src/mock_analysis.rs +++ b/crates/ra_ide/src/mock_analysis.rs @@ -1,8 +1,8 @@ //! FIXME: write short doc here use std::sync::Arc; +use base_db::{CrateName, FileSet, SourceRoot, VfsPath}; use cfg::CfgOptions; -use ra_db::{CrateName, FileSet, SourceRoot, VfsPath}; use test_utils::{ extract_annotations, extract_range_or_offset, Fixture, RangeOrOffset, CURSOR_MARKER, }; diff --git a/crates/ra_ide/src/parent_module.rs b/crates/ra_ide/src/parent_module.rs index b78388e6b..8439e1d5d 100644 --- a/crates/ra_ide/src/parent_module.rs +++ b/crates/ra_ide/src/parent_module.rs @@ -1,5 +1,5 @@ +use base_db::{CrateId, FileId, FilePosition}; use hir::Semantics; -use ra_db::{CrateId, FileId, FilePosition}; use ra_ide_db::RootDatabase; use syntax::{ algo::find_node_at_offset, @@ -63,8 +63,8 @@ pub(crate) fn crate_for(db: &RootDatabase, file_id: FileId) -> Vec { #[cfg(test)] mod tests { + use base_db::Env; use cfg::CfgOptions; - use ra_db::Env; use test_utils::mark; use crate::{ diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index a075618e7..5697b9d87 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -1,7 +1,7 @@ //! FIXME: write short doc here +use base_db::SourceDatabaseExt; use hir::{Module, ModuleDef, ModuleSource, Semantics}; -use ra_db::SourceDatabaseExt; use ra_ide_db::{ defs::{classify_name, classify_name_ref, Definition, NameClass, NameRefClass}, RootDatabase, diff --git a/crates/ra_ide/src/ssr.rs b/crates/ra_ide/src/ssr.rs index 8be862fd6..97b82b70e 100644 --- a/crates/ra_ide/src/ssr.rs +++ b/crates/ra_ide/src/ssr.rs @@ -1,4 +1,4 @@ -use ra_db::{FilePosition, FileRange}; +use base_db::{FilePosition, FileRange}; use ra_ide_db::RootDatabase; use crate::SourceFileEdit; diff --git a/crates/ra_ide/src/status.rs b/crates/ra_ide/src/status.rs index 797ead1ad..869c74acc 100644 --- a/crates/ra_ide/src/status.rs +++ b/crates/ra_ide/src/status.rs @@ -1,11 +1,11 @@ use std::{fmt, iter::FromIterator, sync::Arc}; -use hir::MacroFile; -use profile::{memory_usage, Bytes}; -use ra_db::{ +use base_db::{ salsa::debug::{DebugQueryTable, TableEntry}, FileTextQuery, SourceRootId, }; +use hir::MacroFile; +use profile::{memory_usage, Bytes}; use ra_ide_db::{ symbol_index::{LibrarySymbolsQuery, SymbolIndex}, RootDatabase, @@ -16,7 +16,7 @@ use syntax::{ast, Parse, SyntaxNode}; use crate::FileId; fn syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { - ra_db::ParseQuery.in_db(db).entries::() + base_db::ParseQuery.in_db(db).entries::() } fn macro_syntax_tree_stats(db: &RootDatabase) -> SyntaxTreeStats { hir::db::ParseMacroQuery.in_db(db).entries::() diff --git a/crates/ra_ide/src/syntax_highlighting/html.rs b/crates/ra_ide/src/syntax_highlighting/html.rs index 418122648..249368ff8 100644 --- a/crates/ra_ide/src/syntax_highlighting/html.rs +++ b/crates/ra_ide/src/syntax_highlighting/html.rs @@ -1,7 +1,7 @@ //! Renders a bit of code as HTML. +use base_db::SourceDatabase; use oorandom::Rand32; -use ra_db::SourceDatabase; use syntax::{AstNode, TextRange, TextSize}; use crate::{syntax_highlighting::highlight, FileId, RootDatabase}; diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index d05ff2214..17daf06b6 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs @@ -1,4 +1,4 @@ -use ra_db::{FileId, SourceDatabase}; +use base_db::{FileId, SourceDatabase}; use ra_ide_db::RootDatabase; use syntax::{ algo, AstNode, NodeOrToken, SourceFile, diff --git a/crates/ra_ide/src/typing.rs b/crates/ra_ide/src/typing.rs index 7897c57b7..75f2a6b60 100644 --- a/crates/ra_ide/src/typing.rs +++ b/crates/ra_ide/src/typing.rs @@ -15,7 +15,7 @@ mod on_enter; -use ra_db::{FilePosition, SourceDatabase}; +use base_db::{FilePosition, SourceDatabase}; use ra_ide_db::{source_change::SourceFileEdit, RootDatabase}; use syntax::{ algo::find_node_at_offset, diff --git a/crates/ra_ide/src/typing/on_enter.rs b/crates/ra_ide/src/typing/on_enter.rs index 9cd153f94..193930659 100644 --- a/crates/ra_ide/src/typing/on_enter.rs +++ b/crates/ra_ide/src/typing/on_enter.rs @@ -1,7 +1,7 @@ //! Handles the `Enter` key press. At the momently, this only continues //! comments, but should handle indent some time in the future as well. -use ra_db::{FilePosition, SourceDatabase}; +use base_db::{FilePosition, SourceDatabase}; use ra_ide_db::RootDatabase; use syntax::{ ast::{self, AstToken}, -- cgit v1.2.3