@@ -59,13 +59,10 @@ fn get_imports(cache: &dyn Cache, info: &CanisterInfo, imports: &mut ImportsTrac
5959 let parent = if let Some ( top) = top {
6060 MotokoImport :: Canister ( top. get_name ( ) . to_string ( ) ) // a little inefficient
6161 } else {
62+ println ! ( "FILE: {}" , file. to_path_buf( ) . to_str( ) . unwrap( ) ) ;
6263 MotokoImport :: Relative ( file. to_path_buf ( ) )
6364 } ;
64- if imports. nodes . contains_key ( & parent) {
65- return Ok ( ( ) ) ;
66- }
67- let parent_node_index = * imports. nodes . entry ( parent. clone ( ) ) . or_insert_with ( || imports. graph . add_node ( parent. clone ( ) ) ) ;
68- imports. nodes . insert ( parent. clone ( ) , parent_node_index) ;
65+ imports. nodes . entry ( parent. clone ( ) ) . or_insert_with ( || imports. graph . add_node ( parent. clone ( ) ) ) ;
6966
7067 let mut command = cache. get_binary_command ( "moc" ) ?;
7168 let command = command. arg ( "--print-deps" ) . arg ( file) ;
@@ -200,10 +197,13 @@ impl CanisterBuilder for MotokoBuilder {
200197 if let Ok ( wasm_file_metadata) = metadata ( output_wasm_path) {
201198 let wasm_file_time = wasm_file_metadata. modified ( ) ?;
202199 let mut imports = pool. imports . borrow_mut ( ) ;
200+ println ! ( "NODES: {:?}" , imports. nodes) ;
201+ println ! ( "NAME: {}" , canister_info. get_name( ) . to_string( ) ) ;
203202 // TODO: ineffective to_string()
204203 let start = if let Some ( node_index) = imports. nodes . get ( & MotokoImport :: Canister ( canister_info. get_name ( ) . to_string ( ) ) ) {
205- * node_index
204+ * node_index
206205 } else {
206+ println ! ( "XILE: {}" , motoko_info. get_main_path( ) . to_str( ) . unwrap( ) ) ;
207207 let node = MotokoImport :: Relative ( motoko_info. get_main_path ( ) . to_path_buf ( ) ) ;
208208 let node_index = imports. graph . add_node ( node. clone ( ) ) ;
209209 imports. nodes . insert ( node, node_index) ;
0 commit comments