mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
chore: resolve decl package path
This commit is contained in:
parent
027009680a
commit
14bf431c57
5 changed files with 36 additions and 14 deletions
|
@ -13,7 +13,7 @@ use std::time::{Duration, SystemTime};
|
|||
use erg_common::config::ErgMode;
|
||||
|
||||
use erg_common::config::ErgConfig;
|
||||
use erg_common::consts::ELS;
|
||||
use erg_common::consts::{DEBUG_MODE, ELS};
|
||||
use erg_common::debug_power_assert;
|
||||
use erg_common::dict::Dict;
|
||||
use erg_common::env::is_std_decl_path;
|
||||
|
@ -525,7 +525,11 @@ impl<ASTBuilder: ASTBuildable, HIRBuilder: Buildable>
|
|||
.spawn()
|
||||
.and_then(|mut child| child.wait())
|
||||
{
|
||||
if let Some(path) = self.cfg.input.resolve_decl_path(Path::new(&__name__[..])) {
|
||||
if let Some(path) = self
|
||||
.cfg
|
||||
.input
|
||||
.resolve_decl_path(Path::new(&__name__[..]), &self.cfg)
|
||||
{
|
||||
let size = metadata(&path).unwrap().len();
|
||||
// if pylyzer crashed
|
||||
if !status.success() && size == 0 {
|
||||
|
@ -728,7 +732,7 @@ impl<ASTBuilder: ASTBuildable, HIRBuilder: Buildable>
|
|||
// return;
|
||||
} else if let Some(inliner) = self.inlines.get(path).cloned() {
|
||||
self.build_deps_and_module(&inliner, graph);
|
||||
} else {
|
||||
} else if DEBUG_MODE {
|
||||
todo!("{path} is not found in self.inlines and self.asts");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue