Skip to content

Commit d7b6052

Browse files
committed
bug fix
1 parent e611bc2 commit d7b6052

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ fn get_imports(cache: &dyn Cache, info: &CanisterInfo, imports: &mut ImportsTrac
9292
}
9393
let parent_node_index = *imports.nodes.entry(parent.clone()).or_insert_with(|| imports.graph.add_node(parent.clone()));
9494
let child_node_index = *imports.nodes.entry(child.clone()).or_insert_with(|| imports.graph.add_node(child.clone()));
95-
imports.graph.add_edge(parent_node_index, child_node_index, ());
95+
imports.graph.update_edge(parent_node_index, child_node_index, ());
9696
}
9797

9898
Ok(())

src/dfx/src/lib/models/canister.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@ impl CanisterPool {
634634

635635
let dest_parent_id = *dest_id_set.entry(source_parent_id).or_insert_with(|| dest_graph.add_node(parent_canister));
636636
let dest_child_id = *dest_id_set.entry(source_child_id).or_insert_with(|| dest_graph.add_node(child_canister));
637-
dest_graph.add_edge(dest_parent_id, dest_child_id, ());
637+
dest_graph.update_edge(dest_parent_id, dest_child_id, ());
638638
}
639639
);
640640
}
@@ -824,6 +824,7 @@ impl CanisterPool {
824824
.rev() // Reverse the order, as we have a dependency graph, we want to reverse indices.
825825
.map(|idx| *graph.node_weight(*idx).unwrap())
826826
.collect();
827+
println!("ORDER: {:?}", order.iter().map(|c| c.to_text()).collect::<Vec<_>>());
827828

828829
// let canisters_to_build = Bfs::new(graph, start);
829830
// let canisters_to_build = self.canisters_to_build(build_config); // FIXME

0 commit comments

Comments
 (0)