mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
feat(els): support d.er
renaming
* fix a bug that left diagnostics * fix to include PyModule in dependencies * fix `clear_cache`
This commit is contained in:
parent
0302110518
commit
99db34b61c
7 changed files with 140 additions and 49 deletions
|
@ -1553,6 +1553,10 @@ impl Context {
|
|||
let ValueObj::Str(__name__) = mod_name.value.clone() else { todo!("{mod_name}") };
|
||||
let py_mod_cache = self.py_mod_cache().unwrap();
|
||||
let path = self.get_path(mod_name, __name__)?;
|
||||
if let Some(referrer) = self.cfg.input.path() {
|
||||
let graph = &self.shared.as_ref().unwrap().graph;
|
||||
graph.inc_ref(referrer, path.clone());
|
||||
}
|
||||
if py_mod_cache.get(&path).is_some() {
|
||||
return Ok(path);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue