Reexport relative_path from ra_db

This commit is contained in:
Aleksey Kladov 2019-11-04 01:14:17 +03:00
parent e811be0fdc
commit 3603d02134
16 changed files with 15 additions and 27 deletions

3
Cargo.lock generated
View file

@ -1019,7 +1019,6 @@ dependencies = [
"ra_prof 0.1.0",
"ra_syntax 0.1.0",
"ra_tt 0.1.0",
"relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0",
]
@ -1039,7 +1038,6 @@ dependencies = [
"ra_prof 0.1.0",
"ra_syntax 0.1.0",
"ra_tt 0.1.0",
"relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0",
]
@ -1079,7 +1077,6 @@ dependencies = [
"ra_text_edit 0.1.0",
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"relative-path 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
"superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"test_utils 0.1.0",

View file

@ -6,13 +6,14 @@
//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how
//! actual IO is done and lowered to input.
use relative_path::{RelativePath, RelativePathBuf};
use rustc_hash::FxHashMap;
use ra_cfg::CfgOptions;
use ra_syntax::SmolStr;
use rustc_hash::FxHashSet;
use crate::{RelativePath, RelativePathBuf};
/// `FileId` is an integer which uniquely identifies a file. File paths are
/// messy and system-dependent, so most of the code should work directly with
/// `FileId`, without inspecting the path. The mapping between `FileId` and path

View file

@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"]
[dependencies]
arrayvec = "0.5.1"
log = "0.4.5"
relative-path = "1.0.0"
rustc-hash = "1.0"
parking_lot = "0.9.0"
ena = "0.13"

View file

@ -7,9 +7,8 @@ use parking_lot::Mutex;
use ra_cfg::CfgOptions;
use ra_db::{
salsa, CrateGraph, CrateId, Edition, FileId, FileLoader, FileLoaderDelegate, FilePosition,
SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId,
RelativePath, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId,
};
use relative_path::{RelativePath, RelativePathBuf};
use rustc_hash::FxHashMap;
use test_utils::{extract_offset, parse_fixture, CURSOR_MARKER};

View file

@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"]
[dependencies]
log = "0.4.5"
once_cell = "1.0.1"
relative-path = "1.0.0"
rustc-hash = "1.0"
ra_arena = { path = "../ra_arena" }
@ -22,4 +21,3 @@ tt = { path = "../ra_tt", package = "ra_tt" }
[dev-dependencies]
insta = "0.12.0"

View file

@ -3,8 +3,8 @@
use std::any::Any;
use hir_expand::diagnostics::Diagnostic;
use ra_db::RelativePathBuf;
use ra_syntax::{ast, AstPtr, SyntaxNodePtr};
use relative_path::RelativePathBuf;
use hir_expand::{HirFileId, Source};

View file

@ -504,8 +504,8 @@ impl CrateDefMap {
mod diagnostics {
use hir_expand::diagnostics::DiagnosticSink;
use ra_db::RelativePathBuf;
use ra_syntax::{ast, AstPtr};
use relative_path::RelativePathBuf;
use crate::{db::DefDatabase2, diagnostics::UnresolvedModule, nameres::CrateModuleId, AstId};

View file

@ -1,8 +1,7 @@
//! This module resolves `mod foo;` declaration to file.
use hir_expand::name::Name;
use ra_db::FileId;
use ra_db::{FileId, RelativePathBuf};
use ra_syntax::SmolStr;
use relative_path::RelativePathBuf;
use crate::{db::DefDatabase2, HirFileId};

View file

@ -5,8 +5,7 @@ use std::{
sync::{Arc, Mutex},
};
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate};
use relative_path::RelativePath;
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath};
#[salsa::database(
ra_db::SourceDatabaseExtStorage,

View file

@ -12,7 +12,6 @@ format-buf = "1.0.0"
itertools = "0.8.0"
join_to_string = "0.1.3"
log = "0.4.5"
relative-path = "1.0.0"
rayon = "1.0.2"
fst = { version = "0.3.1", default-features = false }
rustc-hash = "1.0"

View file

@ -4,13 +4,13 @@ use std::{fmt, sync::Arc, time};
use ra_db::{
salsa::{Database, Durability, SweepStrategy},
CrateGraph, CrateId, FileId, SourceDatabase, SourceDatabaseExt, SourceRoot, SourceRootId,
CrateGraph, CrateId, FileId, RelativePathBuf, SourceDatabase, SourceDatabaseExt, SourceRoot,
SourceRootId,
};
use ra_prof::{memory_usage, profile, Bytes};
use ra_syntax::SourceFile;
#[cfg(not(feature = "wasm"))]
use rayon::prelude::*;
use relative_path::RelativePathBuf;
use rustc_hash::FxHashMap;
use crate::{

View file

@ -4,10 +4,9 @@ use std::sync::Arc;
use ra_db::{
salsa::{self, Database, Durability},
Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase,
SourceDatabaseExt, SourceRootId,
Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath,
SourceDatabase, SourceDatabaseExt, SourceRootId,
};
use relative_path::RelativePath;
use rustc_hash::FxHashMap;
use crate::{

View file

@ -4,7 +4,7 @@ use std::cell::RefCell;
use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink};
use itertools::Itertools;
use ra_db::{SourceDatabase, SourceDatabaseExt};
use ra_db::{RelativePath, SourceDatabase, SourceDatabaseExt};
use ra_prof::profile;
use ra_syntax::{
algo,
@ -12,7 +12,6 @@ use ra_syntax::{
Location, SyntaxNode, TextRange, T,
};
use ra_text_edit::{TextEdit, TextEditBuilder};
use relative_path::RelativePath;
use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit};

View file

@ -3,7 +3,7 @@
use std::sync::Arc;
use ra_cfg::CfgOptions;
use relative_path::RelativePathBuf;
use ra_db::RelativePathBuf;
use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER};
use crate::{

View file

@ -1,10 +1,9 @@
//! FIXME: write short doc here
use hir::ModuleSource;
use ra_db::{SourceDatabase, SourceDatabaseExt};
use ra_db::{RelativePath, RelativePathBuf, SourceDatabase, SourceDatabaseExt};
use ra_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode};
use ra_text_edit::TextEdit;
use relative_path::{RelativePath, RelativePathBuf};
use crate::{
db::RootDatabase, FileId, FilePosition, FileSystemEdit, RangeInfo, SourceChange,

View file

@ -3,8 +3,8 @@
//!
//! It can be viewed as a dual for `AnalysisChange`.
use ra_db::RelativePathBuf;
use ra_text_edit::TextEdit;
use relative_path::RelativePathBuf;
use crate::{FileId, FilePosition, SourceRootId, TextUnit};