Skip to content

Commit 343b9e1

Browse files
committed
[FIX] Rebuild __iter__ evaluation if not ready
When rebuilding __iter__ function, arch has to be done too, as it is a function. If arch_eval has not been done yet, arch has not either. However, we can't do it for external files as file_info has been discarded
1 parent 2688306 commit 343b9e1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

server/src/core/python_arch_eval.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,11 @@ impl PythonArchEval {
833833
if symbol_type.typ() == SymType::CLASS {
834834
let (iter, _) = symbol_type.get_member_symbol(session, &S!("__iter__"), None, true, false, false, false, false);
835835
if iter.len() == 1 {
836-
SyncOdoo::build_now(session, &iter[0], BuildSteps::ARCH_EVAL);
837-
SyncOdoo::build_now(session, &iter[0], BuildSteps::VALIDATION);
836+
if !iter[0].borrow().is_external() { //we can't rebuild functions of external files
837+
SyncOdoo::build_now(session, &iter[0], BuildSteps::ARCH);
838+
SyncOdoo::build_now(session, &iter[0], BuildSteps::ARCH_EVAL);
839+
SyncOdoo::build_now(session, &iter[0], BuildSteps::VALIDATION);
840+
}
838841
if iter[0].borrow().evaluations().is_some() && iter[0].borrow().evaluations().unwrap().len() == 1 {
839842
let iter = iter[0].borrow();
840843
let eval_iter = &iter.evaluations().unwrap()[0];

0 commit comments

Comments
 (0)