@@ -53,6 +53,7 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
53
53
imports : & mut ImportsTracker ,
54
54
pool : & CanisterPool ,
55
55
) -> DfxResult {
56
+ println ! ( "CanisterInfo: {:#?}" , file) ;
56
57
let parent = MotokoImport :: Relative ( file. to_path_buf ( ) ) ;
57
58
if imports. nodes . contains_key ( & parent) {
58
59
return Ok ( ( ) ) ;
@@ -86,13 +87,17 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
86
87
_ => { }
87
88
}
88
89
let parent_node = imports. graph . add_node ( parent. clone ( ) ) ;
89
- let child_node = imports. graph . add_node ( child) ;
90
+ if let MotokoImport :: Relative ( child) = & child {
91
+ println ! ( "INSERTED CHILD: {}" , child. display( ) ) ; // FIXME
92
+ }
93
+ let child_node = imports. graph . add_node ( child) ;
90
94
imports. graph . add_edge ( parent_node, child_node, ( ) ) ;
91
95
}
92
96
93
97
Ok ( ( ) )
94
98
}
95
99
100
+ println ! ( "CanisterInfo2: {:#?}" , info. get_main_path( ) ) ;
96
101
get_imports_recursive ( cache, info. get_main_path ( ) , imports, pool) ?;
97
102
98
103
Ok ( ( ) )
@@ -106,7 +111,9 @@ impl CanisterBuilder for MotokoBuilder {
106
111
info : & CanisterInfo ,
107
112
) -> DfxResult < Vec < CanisterId > > {
108
113
let motoko_info = info. as_info :: < MotokoCanisterInfo > ( ) ?;
114
+ println ! ( "CanisterInfo3: {:#?}" , info. get_main_file( ) ) ; // FIXME
109
115
get_imports ( self . cache . as_ref ( ) , & motoko_info, & mut * pool. imports . borrow_mut ( ) , pool) ?;
116
+ println ! ( "CanisterInfo4: {:#?}" , motoko_info. get_main_path( ) ) ; // FIXME
110
117
111
118
Ok ( pool. imports . borrow ( ) . nodes
112
119
. iter ( )
@@ -129,6 +136,7 @@ impl CanisterBuilder for MotokoBuilder {
129
136
config : & BuildConfig ,
130
137
) -> DfxResult < BuildOutput > {
131
138
let motoko_info = canister_info. as_info :: < MotokoCanisterInfo > ( ) ?;
139
+ println ! ( "motoko_info: {}" , motoko_info. get_main_path( ) . display( ) ) ;
132
140
let profile = config. profile ;
133
141
let input_path = motoko_info. get_main_path ( ) ;
134
142
let output_wasm_path = motoko_info. get_output_wasm_path ( ) ;
0 commit comments