From cb6205c09da9fd6fc0bd9f88106f5e9bd3f471aa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 18 Dec 2018 17:22:48 +0300 Subject: use relpaths for module resolve --- crates/ra_db/src/input.rs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'crates/ra_db') diff --git a/crates/ra_db/src/input.rs b/crates/ra_db/src/input.rs index ac144b991..b09014dc6 100644 --- a/crates/ra_db/src/input.rs +++ b/crates/ra_db/src/input.rs @@ -1,6 +1,7 @@ use std::sync::Arc; use rustc_hash::{FxHashSet, FxHashMap}; +use relative_path::RelativePathBuf; use ra_syntax::SmolStr; use salsa; @@ -85,10 +86,23 @@ salsa::query_group! { type FileTextQuery; storage input; } + /// Path to a file, relative to the root of its source root. + fn file_relative_path(file_id: FileId) -> RelativePathBuf { + type FileRelativePathQuery; + storage input; + } fn file_source_root(file_id: FileId) -> SourceRootId { type FileSourceRootQuery; storage input; } + fn source_root_files(id: SourceRootId) -> Arc> { + type SourceRootFilesQuery; + storage input; + } + fn source_root_file_by_path(id: SourceRootId, path: RelativePathBuf) -> Option { + type SourceRootFilesByPathQuery; + storage input; + } fn source_root(id: SourceRootId) -> Arc { type SourceRootQuery; storage input; -- cgit v1.2.3