@@ -59,9 +59,6 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
59
59
}
60
60
let parent_node_index = * imports. nodes . entry ( parent. clone ( ) ) . or_insert_with ( || imports. graph . add_node ( parent. clone ( ) ) ) ;
61
61
imports. nodes . insert ( parent. clone ( ) , parent_node_index) ;
62
- if let MotokoImport :: Relative ( path) = & parent {
63
- println ! ( "INSERTED: {}" , path. display( ) ) ; // FIXME
64
- }
65
62
66
63
let mut command = cache. get_binary_command ( "moc" ) ?;
67
64
let command = command. arg ( "--print-deps" ) . arg ( file) ;
@@ -88,13 +85,6 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
88
85
}
89
86
let parent_node_index = * imports. nodes . entry ( parent. clone ( ) ) . or_insert_with ( || imports. graph . add_node ( parent. clone ( ) ) ) ;
90
87
let child_node_index = * imports. nodes . entry ( child. clone ( ) ) . or_insert_with ( || imports. graph . add_node ( child. clone ( ) ) ) ;
91
- // if let MotokoImport::Relative(parent) = &parent {
92
- // println!("INSERTED PARENT: {} ({:?})", parent.display(), parent_node); // FIXME
93
- // }
94
- // let child_node = imports.graph.add_node(child.clone());
95
- // if let MotokoImport::Relative(child) = &child {
96
- // println!("INSERTED CHILD: {} ({:?})", child.display(), child_node); // FIXME
97
- // }
98
88
imports. graph . add_edge ( parent_node_index, child_node_index, ( ) ) ;
99
89
}
100
90
@@ -114,9 +104,7 @@ impl CanisterBuilder for MotokoBuilder {
114
104
info : & CanisterInfo ,
115
105
) -> DfxResult < Vec < CanisterId > > {
116
106
let motoko_info = info. as_info :: < MotokoCanisterInfo > ( ) ?;
117
- println ! ( "CanisterInfo3: {:#?}" , info. get_main_file( ) ) ; // FIXME
118
107
get_imports ( self . cache . as_ref ( ) , & motoko_info, & mut * pool. imports . borrow_mut ( ) , pool) ?;
119
- println ! ( "CanisterInfo4: {:#?}" , motoko_info. get_main_path( ) ) ; // FIXME
120
108
121
109
Ok ( pool. imports . borrow ( ) . nodes
122
110
. iter ( )
@@ -195,8 +183,6 @@ impl CanisterBuilder for MotokoBuilder {
195
183
if let Ok ( wasm_file_metadata) = metadata ( output_wasm_path) {
196
184
let wasm_file_time = wasm_file_metadata. modified ( ) ?;
197
185
let mut imports = pool. imports . borrow_mut ( ) ;
198
- println ! ( "START: {}" , motoko_info. get_main_path( ) . to_path_buf( ) . display( ) ) ; // FIXME
199
- // let start = imports.graph.add_node(MotokoImport::Relative(motoko_info.get_main_path().to_path_buf())); // Start with oput canister.
200
186
let start = if let Some ( node_index) = imports. nodes . get ( & MotokoImport :: Relative ( motoko_info. get_main_path ( ) . to_path_buf ( ) ) ) {
201
187
* node_index
202
188
} else {
@@ -208,7 +194,6 @@ impl CanisterBuilder for MotokoBuilder {
208
194
let mut import_iter = Bfs :: new ( & imports. graph , start) ;
209
195
loop {
210
196
if let Some ( import) = import_iter. next ( & imports. graph ) {
211
- println ! ( "NodeIndex {:?}" , import) ;
212
197
let imported_file = match & imports. graph [ import] {
213
198
MotokoImport :: Canister ( canister_name) => { // duplicate code
214
199
if let Some ( canister) = pool. get_first_canister_with_name ( canister_name. as_str ( ) ) {
@@ -267,7 +252,6 @@ impl CanisterBuilder for MotokoBuilder {
267
252
} ;
268
253
if let Some ( imported_file) = imported_file {
269
254
let imported_file_metadata = metadata ( imported_file. as_ref ( ) ) ?;
270
- println ! ( "IMPORTED {}" , imported_file. display( ) ) ; // FIXME: Remove.
271
255
let imported_file_time = imported_file_metadata. modified ( ) ?;
272
256
if imported_file_time > wasm_file_time {
273
257
break ;
0 commit comments