mirror of
https://github.com/erg-lang/erg.git
synced 2025-09-30 12:51:10 +00:00
Add ErgConfig::inherit
and remove with_module_path
This commit is contained in:
parent
0e928c758f
commit
b09fce8a86
2 changed files with 10 additions and 11 deletions
|
@ -1,7 +1,6 @@
|
|||
use std::option::Option;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
use erg_common::config::ErgConfig;
|
||||
use erg_common::env::erg_pystd_path;
|
||||
use erg_common::levenshtein::get_similar_name;
|
||||
use erg_common::python_util::BUILTIN_PYTHON_MODS;
|
||||
|
@ -1215,7 +1214,7 @@ impl Context {
|
|||
if mod_cache.get(&path).is_some() {
|
||||
return Ok(path);
|
||||
}
|
||||
let cfg = ErgConfig::with_module_path(path.clone());
|
||||
let cfg = self.cfg.inherit(path.clone());
|
||||
let src = cfg.input.read();
|
||||
let mut builder =
|
||||
HIRBuilder::new_with_cache(cfg, __name__, mod_cache.clone(), py_mod_cache.clone());
|
||||
|
@ -1307,7 +1306,7 @@ impl Context {
|
|||
if py_mod_cache.get(&path).is_some() {
|
||||
return Ok(path);
|
||||
}
|
||||
let cfg = ErgConfig::with_module_path(path.clone());
|
||||
let cfg = self.cfg.inherit(path.clone());
|
||||
let src = cfg.input.read();
|
||||
let mut builder = HIRBuilder::new_with_cache(
|
||||
cfg,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue