mirror of
https://github.com/coder3101/protols.git
synced 2025-12-23 05:36:51 +00:00
test: debug import path and import field
This commit is contained in:
parent
651b8896a9
commit
2519968220
1 changed files with 8 additions and 1 deletions
|
|
@ -137,12 +137,19 @@ impl ProtoLanguageState {
|
|||
|
||||
// After content is upserted, those imports which couldn't be located
|
||||
// are flagged as import error
|
||||
tracing::info!(?ipath, "import path");
|
||||
self.get_tree(uri)
|
||||
.map(|t| t.get_import_paths(content.as_ref()))
|
||||
.unwrap_or_default()
|
||||
.into_iter()
|
||||
.map(ToOwned::to_owned)
|
||||
.filter(|import| !ipath.iter().any(|p| p.join(import.as_str()).exists()))
|
||||
.filter(|import| {
|
||||
tracing::info!(
|
||||
%import,
|
||||
"trying import",
|
||||
);
|
||||
!ipath.iter().any(|p| p.join(import.as_str()).exists())
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue