diff options
Diffstat (limited to 'crates/ra_analysis/src')
-rw-r--r-- | crates/ra_analysis/src/imp.rs | 8 | ||||
-rw-r--r-- | crates/ra_analysis/src/input.rs | 3 |
2 files changed, 11 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/imp.rs b/crates/ra_analysis/src/imp.rs index e1493bdaa..ad6b52371 100644 --- a/crates/ra_analysis/src/imp.rs +++ b/crates/ra_analysis/src/imp.rs | |||
@@ -59,6 +59,9 @@ impl FileResolverImp { | |||
59 | pub(crate) fn resolve(&self, file_id: FileId, path: &RelativePath) -> Option<FileId> { | 59 | pub(crate) fn resolve(&self, file_id: FileId, path: &RelativePath) -> Option<FileId> { |
60 | self.inner.resolve(file_id, path) | 60 | self.inner.resolve(file_id, path) |
61 | } | 61 | } |
62 | pub(crate) fn debug_path(&self, file_id: FileId) -> Option<std::path::PathBuf> { | ||
63 | self.inner.debug_path(file_id) | ||
64 | } | ||
62 | fn inner(&self) -> *const FileResolver { | 65 | fn inner(&self) -> *const FileResolver { |
63 | &*self.inner | 66 | &*self.inner |
64 | } | 67 | } |
@@ -138,6 +141,11 @@ impl AnalysisHostImpl { | |||
138 | let mut files = FxHashSet::default(); | 141 | let mut files = FxHashSet::default(); |
139 | for (file_id, text) in library.files { | 142 | for (file_id, text) in library.files { |
140 | files.insert(file_id); | 143 | files.insert(file_id); |
144 | log::debug!( | ||
145 | "library file: {:?} {:?}", | ||
146 | file_id, | ||
147 | library.file_resolver.debug_path(file_id) | ||
148 | ); | ||
141 | self.db | 149 | self.db |
142 | .query_mut(crate::input::FileSourceRootQuery) | 150 | .query_mut(crate::input::FileSourceRootQuery) |
143 | .set_constant(file_id, source_root_id); | 151 | .set_constant(file_id, source_root_id); |
diff --git a/crates/ra_analysis/src/input.rs b/crates/ra_analysis/src/input.rs index ba8a17fd5..a78b6e397 100644 --- a/crates/ra_analysis/src/input.rs +++ b/crates/ra_analysis/src/input.rs | |||
@@ -33,6 +33,9 @@ impl CrateGraph { | |||
33 | pub trait FileResolver: fmt::Debug + Send + Sync + 'static { | 33 | pub trait FileResolver: fmt::Debug + Send + Sync + 'static { |
34 | fn file_stem(&self, file_id: FileId) -> String; | 34 | fn file_stem(&self, file_id: FileId) -> String; |
35 | fn resolve(&self, file_id: FileId, path: &RelativePath) -> Option<FileId>; | 35 | fn resolve(&self, file_id: FileId, path: &RelativePath) -> Option<FileId>; |
36 | fn debug_path(&self, _file_id: FileId) -> Option<std::path::PathBuf> { | ||
37 | None | ||
38 | } | ||
36 | } | 39 | } |
37 | 40 | ||
38 | salsa::query_group! { | 41 | salsa::query_group! { |