Re-export base_db from ide_db

This commit is contained in:
Igor Aleksanov
2020-10-24 11:39:57 +03:00
parent 2c787676c9
commit 19cce08662
52 changed files with 69 additions and 74 deletions

View File

@@ -3,13 +3,13 @@
use std::{env, path::PathBuf, str::FromStr, sync::Arc, time::Instant};
use anyhow::{bail, format_err, Result};
use base_db::{
salsa::{Database, Durability},
FileId,
};
use ide::{
Analysis, AnalysisHost, Change, CompletionConfig, DiagnosticsConfig, FilePosition, LineCol,
};
use ide_db::base_db::{
salsa::{Database, Durability},
FileId,
};
use vfs::AbsPathBuf;
use crate::{

View File

@@ -6,16 +6,16 @@ use std::{
time::{SystemTime, UNIX_EPOCH},
};
use base_db::{
salsa::{self, ParallelDatabase},
SourceDatabaseExt,
};
use hir::{
db::{AstDatabase, DefDatabase, HirDatabase},
original_range, AssocItem, Crate, HasSource, HirDisplay, ModuleDef,
};
use hir_def::FunctionId;
use hir_ty::{Ty, TypeWalk};
use ide_db::base_db::{
salsa::{self, ParallelDatabase},
SourceDatabaseExt,
};
use itertools::Itertools;
use oorandom::Rand32;
use rayon::prelude::*;

View File

@@ -6,9 +6,9 @@ use std::path::Path;
use anyhow::anyhow;
use rustc_hash::FxHashSet;
use base_db::SourceDatabaseExt;
use hir::Crate;
use ide::{DiagnosticsConfig, Severity};
use ide_db::base_db::SourceDatabaseExt;
use crate::cli::{load_cargo::load_cargo, Result};

View File

@@ -3,9 +3,9 @@
use std::{path::Path, sync::Arc};
use anyhow::Result;
use base_db::CrateGraph;
use crossbeam_channel::{unbounded, Receiver};
use ide::{AnalysisHost, Change};
use ide_db::base_db::CrateGraph;
use project_model::{CargoConfig, ProcMacroClient, ProjectManifest, ProjectWorkspace};
use vfs::{loader::Handle, AbsPath, AbsPathBuf};

View File

@@ -4,7 +4,7 @@ use crate::cli::{load_cargo::load_cargo, Result};
use ssr::{MatchFinder, SsrPattern, SsrRule};
pub fn apply_ssr_rules(rules: Vec<SsrRule>) -> Result<()> {
use base_db::SourceDatabaseExt;
use ide_db::base_db::SourceDatabaseExt;
let (host, vfs) = load_cargo(&std::env::current_dir()?, true, true)?;
let db = host.raw_database();
let mut match_finder = MatchFinder::at_first_file(db)?;
@@ -26,7 +26,7 @@ pub fn apply_ssr_rules(rules: Vec<SsrRule>) -> Result<()> {
/// `debug_snippet`. This is intended for debugging and probably isn't in it's current form useful
/// for much else.
pub fn search_for_patterns(patterns: Vec<SsrPattern>, debug_snippet: Option<String>) -> Result<()> {
use base_db::SourceDatabaseExt;
use ide_db::base_db::SourceDatabaseExt;
use ide_db::symbol_index::SymbolsDatabase;
let (host, _vfs) = load_cargo(&std::env::current_dir()?, true, true)?;
let db = host.raw_database();