mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Reexport relative_path from ra_db
This commit is contained in:
parent
e811be0fdc
commit
3603d02134
16 changed files with 15 additions and 27 deletions
3
Cargo.lock
generated
3
Cargo.lock
generated
|
@ -1019,7 +1019,6 @@ dependencies = [
|
||||||
"ra_prof 0.1.0",
|
"ra_prof 0.1.0",
|
||||||
"ra_syntax 0.1.0",
|
"ra_syntax 0.1.0",
|
||||||
"ra_tt 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)",
|
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"test_utils 0.1.0",
|
"test_utils 0.1.0",
|
||||||
]
|
]
|
||||||
|
@ -1039,7 +1038,6 @@ dependencies = [
|
||||||
"ra_prof 0.1.0",
|
"ra_prof 0.1.0",
|
||||||
"ra_syntax 0.1.0",
|
"ra_syntax 0.1.0",
|
||||||
"ra_tt 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)",
|
"rustc-hash 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"test_utils 0.1.0",
|
"test_utils 0.1.0",
|
||||||
]
|
]
|
||||||
|
@ -1079,7 +1077,6 @@ dependencies = [
|
||||||
"ra_text_edit 0.1.0",
|
"ra_text_edit 0.1.0",
|
||||||
"rand 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
"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)",
|
"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)",
|
"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)",
|
"superslice 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"test_utils 0.1.0",
|
"test_utils 0.1.0",
|
||||||
|
|
|
@ -6,13 +6,14 @@
|
||||||
//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how
|
//! actual IO. See `vfs` and `project_model` in the `ra_lsp_server` crate for how
|
||||||
//! actual IO is done and lowered to input.
|
//! actual IO is done and lowered to input.
|
||||||
|
|
||||||
use relative_path::{RelativePath, RelativePathBuf};
|
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use ra_cfg::CfgOptions;
|
use ra_cfg::CfgOptions;
|
||||||
use ra_syntax::SmolStr;
|
use ra_syntax::SmolStr;
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
|
use crate::{RelativePath, RelativePathBuf};
|
||||||
|
|
||||||
/// `FileId` is an integer which uniquely identifies a file. File paths are
|
/// `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
|
/// messy and system-dependent, so most of the code should work directly with
|
||||||
/// `FileId`, without inspecting the path. The mapping between `FileId` and path
|
/// `FileId`, without inspecting the path. The mapping between `FileId` and path
|
||||||
|
|
|
@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
arrayvec = "0.5.1"
|
arrayvec = "0.5.1"
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
relative-path = "1.0.0"
|
|
||||||
rustc-hash = "1.0"
|
rustc-hash = "1.0"
|
||||||
parking_lot = "0.9.0"
|
parking_lot = "0.9.0"
|
||||||
ena = "0.13"
|
ena = "0.13"
|
||||||
|
|
|
@ -7,9 +7,8 @@ use parking_lot::Mutex;
|
||||||
use ra_cfg::CfgOptions;
|
use ra_cfg::CfgOptions;
|
||||||
use ra_db::{
|
use ra_db::{
|
||||||
salsa, CrateGraph, CrateId, Edition, FileId, FileLoader, FileLoaderDelegate, FilePosition,
|
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 rustc_hash::FxHashMap;
|
||||||
use test_utils::{extract_offset, parse_fixture, CURSOR_MARKER};
|
use test_utils::{extract_offset, parse_fixture, CURSOR_MARKER};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,6 @@ authors = ["rust-analyzer developers"]
|
||||||
[dependencies]
|
[dependencies]
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
once_cell = "1.0.1"
|
once_cell = "1.0.1"
|
||||||
relative-path = "1.0.0"
|
|
||||||
rustc-hash = "1.0"
|
rustc-hash = "1.0"
|
||||||
|
|
||||||
ra_arena = { path = "../ra_arena" }
|
ra_arena = { path = "../ra_arena" }
|
||||||
|
@ -22,4 +21,3 @@ tt = { path = "../ra_tt", package = "ra_tt" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
insta = "0.12.0"
|
insta = "0.12.0"
|
||||||
|
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
use std::any::Any;
|
use std::any::Any;
|
||||||
|
|
||||||
use hir_expand::diagnostics::Diagnostic;
|
use hir_expand::diagnostics::Diagnostic;
|
||||||
|
use ra_db::RelativePathBuf;
|
||||||
use ra_syntax::{ast, AstPtr, SyntaxNodePtr};
|
use ra_syntax::{ast, AstPtr, SyntaxNodePtr};
|
||||||
use relative_path::RelativePathBuf;
|
|
||||||
|
|
||||||
use hir_expand::{HirFileId, Source};
|
use hir_expand::{HirFileId, Source};
|
||||||
|
|
||||||
|
|
|
@ -504,8 +504,8 @@ impl CrateDefMap {
|
||||||
|
|
||||||
mod diagnostics {
|
mod diagnostics {
|
||||||
use hir_expand::diagnostics::DiagnosticSink;
|
use hir_expand::diagnostics::DiagnosticSink;
|
||||||
|
use ra_db::RelativePathBuf;
|
||||||
use ra_syntax::{ast, AstPtr};
|
use ra_syntax::{ast, AstPtr};
|
||||||
use relative_path::RelativePathBuf;
|
|
||||||
|
|
||||||
use crate::{db::DefDatabase2, diagnostics::UnresolvedModule, nameres::CrateModuleId, AstId};
|
use crate::{db::DefDatabase2, diagnostics::UnresolvedModule, nameres::CrateModuleId, AstId};
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
//! This module resolves `mod foo;` declaration to file.
|
//! This module resolves `mod foo;` declaration to file.
|
||||||
use hir_expand::name::Name;
|
use hir_expand::name::Name;
|
||||||
use ra_db::FileId;
|
use ra_db::{FileId, RelativePathBuf};
|
||||||
use ra_syntax::SmolStr;
|
use ra_syntax::SmolStr;
|
||||||
use relative_path::RelativePathBuf;
|
|
||||||
|
|
||||||
use crate::{db::DefDatabase2, HirFileId};
|
use crate::{db::DefDatabase2, HirFileId};
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,7 @@ use std::{
|
||||||
sync::{Arc, Mutex},
|
sync::{Arc, Mutex},
|
||||||
};
|
};
|
||||||
|
|
||||||
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate};
|
use ra_db::{salsa, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath};
|
||||||
use relative_path::RelativePath;
|
|
||||||
|
|
||||||
#[salsa::database(
|
#[salsa::database(
|
||||||
ra_db::SourceDatabaseExtStorage,
|
ra_db::SourceDatabaseExtStorage,
|
||||||
|
|
|
@ -12,7 +12,6 @@ format-buf = "1.0.0"
|
||||||
itertools = "0.8.0"
|
itertools = "0.8.0"
|
||||||
join_to_string = "0.1.3"
|
join_to_string = "0.1.3"
|
||||||
log = "0.4.5"
|
log = "0.4.5"
|
||||||
relative-path = "1.0.0"
|
|
||||||
rayon = "1.0.2"
|
rayon = "1.0.2"
|
||||||
fst = { version = "0.3.1", default-features = false }
|
fst = { version = "0.3.1", default-features = false }
|
||||||
rustc-hash = "1.0"
|
rustc-hash = "1.0"
|
||||||
|
|
|
@ -4,13 +4,13 @@ use std::{fmt, sync::Arc, time};
|
||||||
|
|
||||||
use ra_db::{
|
use ra_db::{
|
||||||
salsa::{Database, Durability, SweepStrategy},
|
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_prof::{memory_usage, profile, Bytes};
|
||||||
use ra_syntax::SourceFile;
|
use ra_syntax::SourceFile;
|
||||||
#[cfg(not(feature = "wasm"))]
|
#[cfg(not(feature = "wasm"))]
|
||||||
use rayon::prelude::*;
|
use rayon::prelude::*;
|
||||||
use relative_path::RelativePathBuf;
|
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -4,10 +4,9 @@ use std::sync::Arc;
|
||||||
|
|
||||||
use ra_db::{
|
use ra_db::{
|
||||||
salsa::{self, Database, Durability},
|
salsa::{self, Database, Durability},
|
||||||
Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase,
|
Canceled, CheckCanceled, CrateId, FileId, FileLoader, FileLoaderDelegate, RelativePath,
|
||||||
SourceDatabaseExt, SourceRootId,
|
SourceDatabase, SourceDatabaseExt, SourceRootId,
|
||||||
};
|
};
|
||||||
use relative_path::RelativePath;
|
|
||||||
use rustc_hash::FxHashMap;
|
use rustc_hash::FxHashMap;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -4,7 +4,7 @@ use std::cell::RefCell;
|
||||||
|
|
||||||
use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink};
|
use hir::diagnostics::{AstDiagnostic, Diagnostic as _, DiagnosticSink};
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use ra_db::{SourceDatabase, SourceDatabaseExt};
|
use ra_db::{RelativePath, SourceDatabase, SourceDatabaseExt};
|
||||||
use ra_prof::profile;
|
use ra_prof::profile;
|
||||||
use ra_syntax::{
|
use ra_syntax::{
|
||||||
algo,
|
algo,
|
||||||
|
@ -12,7 +12,6 @@ use ra_syntax::{
|
||||||
Location, SyntaxNode, TextRange, T,
|
Location, SyntaxNode, TextRange, T,
|
||||||
};
|
};
|
||||||
use ra_text_edit::{TextEdit, TextEditBuilder};
|
use ra_text_edit::{TextEdit, TextEditBuilder};
|
||||||
use relative_path::RelativePath;
|
|
||||||
|
|
||||||
use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit};
|
use crate::{db::RootDatabase, Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
use ra_cfg::CfgOptions;
|
use ra_cfg::CfgOptions;
|
||||||
use relative_path::RelativePathBuf;
|
use ra_db::RelativePathBuf;
|
||||||
use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER};
|
use test_utils::{extract_offset, extract_range, parse_fixture, CURSOR_MARKER};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
//! FIXME: write short doc here
|
//! FIXME: write short doc here
|
||||||
|
|
||||||
use hir::ModuleSource;
|
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_syntax::{algo::find_node_at_offset, ast, AstNode, SyntaxNode};
|
||||||
use ra_text_edit::TextEdit;
|
use ra_text_edit::TextEdit;
|
||||||
use relative_path::{RelativePath, RelativePathBuf};
|
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
db::RootDatabase, FileId, FilePosition, FileSystemEdit, RangeInfo, SourceChange,
|
db::RootDatabase, FileId, FilePosition, FileSystemEdit, RangeInfo, SourceChange,
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
//!
|
//!
|
||||||
//! It can be viewed as a dual for `AnalysisChange`.
|
//! It can be viewed as a dual for `AnalysisChange`.
|
||||||
|
|
||||||
|
use ra_db::RelativePathBuf;
|
||||||
use ra_text_edit::TextEdit;
|
use ra_text_edit::TextEdit;
|
||||||
use relative_path::RelativePathBuf;
|
|
||||||
|
|
||||||
use crate::{FileId, FilePosition, SourceRootId, TextUnit};
|
use crate::{FileId, FilePosition, SourceRootId, TextUnit};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue