Skip to content

Commit fc6fbc6

Browse files
committed
bug fix
1 parent 760ec44 commit fc6fbc6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dfx/src/lib/builders/motoko.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ impl CanisterBuilder for MotokoBuilder {
200200
if let Ok(wasm_file_metadata) = metadata(output_wasm_path) {
201201
let wasm_file_time = wasm_file_metadata.modified()?;
202202
let mut imports = pool.imports.borrow_mut();
203-
let start = if let Some(node_index) = imports.nodes.get(&MotokoImport::Relative(motoko_info.get_main_path().to_path_buf())) {
204-
*node_index
203+
// TODO: ineffective to_string()
204+
let start = if let Some(node_index) = imports.nodes.get(&MotokoImport::Canister(canister_info.get_name().to_string())) {
205+
*node_index
205206
} else {
206207
let node = MotokoImport::Relative(motoko_info.get_main_path().to_path_buf());
207208
let node_index = imports.graph.add_node(node.clone());

0 commit comments

Comments
 (0)