@@ -3,7 +3,7 @@ use std::{cell::RefCell, cmp, collections::HashMap, path::PathBuf, rc::{Rc, Weak
33use tracing:: { error, info, warn} ;
44use weak_table:: PtrWeakHashSet ;
55
6- use crate :: { constants:: { flatten_tree, BuildSteps , OYarn , PackageType , SymType , Tree } , threads:: SessionInfo , utils:: PathSanitizer } ;
6+ use crate :: { constants:: { flatten_tree, BuildSteps , OYarn , PackageType , SymType , Tree } , threads:: SessionInfo , utils:: PathSanitizer , warn_or_panic } ;
77
88use super :: { odoo:: SyncOdoo , symbols:: symbol:: Symbol } ;
99
@@ -179,10 +179,12 @@ impl EntryPointMgr {
179179 if file_path. ends_with ( "__manifest__.py" ) {
180180 warn ! ( "new custom entry point for manifest without related init.py is not supported outside of main entry point. skipping..." ) ;
181181 session. sync_odoo . entry_point_mgr . borrow_mut ( ) . remove_entries_with_path ( tree_path) ;
182- return false ;
183182 } else {
184- panic ! ( "Trying to create a custom entrypoint on a namespace symbol: {:?}" , new_sym. borrow( ) . paths( ) ) ;
183+ // There was an __init__.py, that was renamed or deleted.
184+ // Another notification will come for the deletion of the file, so we just warn here.
185+ warn_or_panic ! ( "Trying to create a custom entrypoint on a namespace symbol: {:?}" , new_sym. borrow( ) . paths( ) ) ;
185186 }
187+ return false ;
186188 }
187189 _ => { panic ! ( "Unexpected symbol type: {:?}" , new_sym_typ) ; }
188190 }
0 commit comments