Skip to content

Commit 4920ea5

Browse files
authored
fix(python): Include bridge modules in module reachability analysis (#93)
* fix(python): Include bridge modules in module reachability analysis closes #92 * fix(python): extra diagnostics closes #92 * ref(lsp): implement DiagnosticRelatedInformation closes #92 * test: DiagnosticRelatedInformation messages * fix: path working on windows * fix: stay consistent everywhere * rename messages
1 parent 0095527 commit 4920ea5

File tree

24 files changed

+1534
-112
lines changed

24 files changed

+1534
-112
lines changed

src/backend.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,9 @@ impl Backend {
265265
let mut document = self.document_map.get_mut(params.uri.path().as_str()).unwrap();
266266
self.on_change_python(&params.text, &params.uri, slice, params.old_rope)?;
267267
if eager_diagnostics {
268+
let file_path = params.uri.to_file_path().unwrap();
268269
self.diagnose_python(
269-
params.uri.path().as_str(),
270+
file_path.to_str().unwrap(),
270271
slice,
271272
params.text.damage_zone(slice, None),
272273
&mut document.diagnostics_cache,
@@ -376,7 +377,8 @@ impl Backend {
376377
(Text::Delta(_), None) => Err(errloc!("(update_ast) got delta but no ast"))?,
377378
};
378379
let ast = ok!(ast, "No AST was parsed");
379-
self.ast_map.insert(uri.path().as_str().to_string(), ast);
380+
let file_path = uri.to_file_path().unwrap();
381+
self.ast_map.insert(file_path.to_str().unwrap().to_string(), ast);
380382
Ok(())
381383
}
382384
pub fn model_references(&self, path: &Path, model: &ModelName) -> anyhow::Result<Option<Vec<Location>>> {

0 commit comments

Comments
 (0)