Skip to content

Commit b708931

Browse files
committed
[FIX] server: import directories before compiled
1 parent f79d24d commit b708931

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

server/src/core/import_resolver.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,14 @@ fn _resolve_new_symbol(session: &mut SessionInfo, parent: Rc<RefCell<Symbol>>, n
378378
SyncOdoo::build_now(session, &_arc_symbol, BuildSteps::ARCH);
379379
return Ok(_arc_symbol);
380380
}
381+
} else if is_dir_cs(full_path.sanitize()) {
382+
//namespace directory
383+
let _rc_symbol = Symbol::create_from_path(session, &full_path, parent.clone(), false);
384+
if _rc_symbol.is_some() {
385+
let _arc_symbol = _rc_symbol.unwrap();
386+
SyncOdoo::build_now(session, &_arc_symbol, BuildSteps::ARCH);
387+
return Ok(_arc_symbol);
388+
}
381389
} else if !matches!(parent.borrow().typ(), SymType::ROOT) {
382390
if cfg!(target_os = "windows") {
383391
for entry in glob((full_path.sanitize() + "*.pyd").as_str()).expect("Failed to read glob pattern") {
@@ -398,14 +406,6 @@ fn _resolve_new_symbol(session: &mut SessionInfo, parent: Rc<RefCell<Symbol>>, n
398406
}
399407
}
400408
}
401-
} else if is_dir_cs(full_path.sanitize()) {
402-
//namespace directory
403-
let _rc_symbol = Symbol::create_from_path(session, &full_path, parent.clone(), false);
404-
if _rc_symbol.is_some() {
405-
let _arc_symbol = _rc_symbol.unwrap();
406-
SyncOdoo::build_now(session, &_arc_symbol, BuildSteps::ARCH);
407-
return Ok(_arc_symbol);
408-
}
409409
}
410410
}
411411
return Err("Symbol not found".to_string())

0 commit comments

Comments
 (0)