Skip to content

Commit b51e8b7

Browse files
mmahroussfda-odoo
authored andcommitted
[FIX] server: check validation deps on invalidate
1 parent e94055c commit b51e8b7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

server/src/core/symbols/symbol.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1695,7 +1695,7 @@ impl Symbol {
16951695
}
16961696

16971697
pub fn invalidate(session: &mut SessionInfo, symbol: Rc<RefCell<Symbol>>, step: &BuildSteps) {
1698-
//signals that a change occured to this symbol. "step" indicates which level of change occured.
1698+
//signals that a change occurred to this symbol. "step" indicates which level of change occurred.
16991699
//It will trigger rebuild on all dependencies
17001700
let mut vec_to_invalidate: VecDeque<Rc<RefCell<Symbol>>> = VecDeque::from([symbol.clone()]);
17011701
while let Some(ref_to_inv) = vec_to_invalidate.pop_front() {
@@ -1745,6 +1745,14 @@ impl Symbol {
17451745
}
17461746
}
17471747
}
1748+
if [BuildSteps::ARCH, BuildSteps::ARCH_EVAL, BuildSteps::VALIDATION].contains(step) && sym_to_inv.dependents().len() > 2 {
1749+
for sym in sym_to_inv.dependents()[BuildSteps::VALIDATION as usize].iter().flatten().flatten() {
1750+
if !Symbol::is_symbol_in_parents(&sym, &ref_to_inv) {
1751+
sym.borrow_mut().invalidate_sub_functions(session);
1752+
session.sync_odoo.add_to_validations(sym.clone());
1753+
}
1754+
}
1755+
}
17481756
if sym_to_inv.has_modules() {
17491757
for sym in sym_to_inv.all_module_symbol() {
17501758
vec_to_invalidate.push_back(sym.clone());

0 commit comments

Comments
 (0)