@@ -6,13 +6,13 @@ use crate::core::xml_validation::XmlValidator;
66use crate :: features:: document_symbols:: DocumentSymbolFeature ;
77use crate :: features:: references:: ReferenceFeature ;
88use crate :: features:: workspace_symbols:: WorkspaceSymbolFeature ;
9+ use crate :: fifo_ptr_weak_hash_set:: FifoPtrWeakHashSet ;
910use crate :: threads:: SessionInfo ;
1011use crate :: features:: completion:: CompletionFeature ;
1112use crate :: features:: definition:: DefinitionFeature ;
1213use crate :: features:: hover:: HoverFeature ;
1314use std:: collections:: HashMap ;
1415use std:: cell:: RefCell ;
15- use std:: ffi:: OsStr ;
1616use std:: rc:: { Rc , Weak } ;
1717use std:: sync:: atomic:: { AtomicBool , Ordering } ;
1818use std:: sync:: { Arc , Mutex } ;
@@ -27,7 +27,6 @@ use serde_json::Value;
2727use tracing:: { error, warn, info, trace} ;
2828
2929use std:: collections:: HashSet ;
30- use weak_table:: PtrWeakHashSet ;
3130use std:: process:: Command ;
3231use std:: fs;
3332use std:: path:: { Path , PathBuf } ;
@@ -86,9 +85,9 @@ pub struct SyncOdoo {
8685 pub current_request_id : Option < RequestId > ,
8786 pub running_request_ids : Arc < Mutex < Vec < RequestId > > > , //Arc to Server mutex for cancellation support
8887 pub watched_file_updates : u32 ,
89- rebuild_arch : PtrWeakHashSet < Weak < RefCell < Symbol > > > ,
90- rebuild_arch_eval : PtrWeakHashSet < Weak < RefCell < Symbol > > > ,
91- rebuild_validation : PtrWeakHashSet < Weak < RefCell < Symbol > > > ,
88+ rebuild_arch : FifoPtrWeakHashSet < RefCell < Symbol > > ,
89+ rebuild_arch_eval : FifoPtrWeakHashSet < RefCell < Symbol > > ,
90+ rebuild_validation : FifoPtrWeakHashSet < RefCell < Symbol > > ,
9291 pub state_init : InitState ,
9392 pub must_reload_paths : Vec < ( Weak < RefCell < Symbol > > , String ) > ,
9493 pub load_odoo_addons : bool , //indicate if we want to load odoo addons or not
@@ -131,9 +130,9 @@ impl SyncOdoo {
131130 current_request_id : None ,
132131 running_request_ids : Arc :: new ( Mutex :: new ( vec ! [ ] ) ) ,
133132 watched_file_updates : 0 ,
134- rebuild_arch : PtrWeakHashSet :: new ( ) ,
135- rebuild_arch_eval : PtrWeakHashSet :: new ( ) ,
136- rebuild_validation : PtrWeakHashSet :: new ( ) ,
133+ rebuild_arch : FifoPtrWeakHashSet :: new ( ) ,
134+ rebuild_arch_eval : FifoPtrWeakHashSet :: new ( ) ,
135+ rebuild_validation : FifoPtrWeakHashSet :: new ( ) ,
137136 state_init : InitState :: NOT_READY ,
138137 must_reload_paths : vec ! [ ] ,
139138 load_odoo_addons : true ,
@@ -161,9 +160,9 @@ impl SyncOdoo {
161160 session. sync_odoo . stdlib_dir = SyncOdoo :: default_stdlib ( ) ;
162161 session. sync_odoo . modules = HashMap :: new ( ) ;
163162 session. sync_odoo . models = HashMap :: new ( ) ;
164- session. sync_odoo . rebuild_arch = PtrWeakHashSet :: new ( ) ;
165- session. sync_odoo . rebuild_arch_eval = PtrWeakHashSet :: new ( ) ;
166- session. sync_odoo . rebuild_validation = PtrWeakHashSet :: new ( ) ;
163+ session. sync_odoo . rebuild_arch = FifoPtrWeakHashSet :: new ( ) ;
164+ session. sync_odoo . rebuild_arch_eval = FifoPtrWeakHashSet :: new ( ) ;
165+ session. sync_odoo . rebuild_validation = FifoPtrWeakHashSet :: new ( ) ;
167166 session. sync_odoo . state_init = InitState :: NOT_READY ;
168167 session. sync_odoo . load_odoo_addons = true ;
169168 session. sync_odoo . need_rebuild = false ;
@@ -537,7 +536,7 @@ impl SyncOdoo {
537536 let mut selected_sym: Option < Rc < RefCell < Symbol > > > = None ;
538537 let mut selected_count: u32 = 999999999 ;
539538 let mut current_count: u32 ;
540- for sym in set {
539+ for sym in set. iter ( ) {
541540 current_count = 0 ;
542541 let file = sym. borrow ( ) . get_file ( ) . unwrap ( ) . upgrade ( ) . unwrap ( ) ;
543542 let file = file. borrow ( ) ;
0 commit comments