Skip to content

Commit 7881f3d

Browse files
committed
misc
1 parent ab71851 commit 7881f3d

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

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

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
5959
}
6060
let parent_node_index = *imports.nodes.entry(parent.clone()).or_insert_with(|| imports.graph.add_node(parent.clone()));
6161
imports.nodes.insert(parent.clone(), parent_node_index);
62-
if let MotokoImport::Relative(path) = &parent {
63-
println!("INSERTED: {}", path.display()); // FIXME
64-
}
6562

6663
let mut command = cache.get_binary_command("moc")?;
6764
let command = command.arg("--print-deps").arg(file);
@@ -88,13 +85,6 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo, imports: &mut Impor
8885
}
8986
let parent_node_index = *imports.nodes.entry(parent.clone()).or_insert_with(|| imports.graph.add_node(parent.clone()));
9087
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-
// }
9888
imports.graph.add_edge(parent_node_index, child_node_index, ());
9989
}
10090

@@ -114,9 +104,7 @@ impl CanisterBuilder for MotokoBuilder {
114104
info: &CanisterInfo,
115105
) -> DfxResult<Vec<CanisterId>> {
116106
let motoko_info = info.as_info::<MotokoCanisterInfo>()?;
117-
println!("CanisterInfo3: {:#?}", info.get_main_file()); // FIXME
118107
get_imports(self.cache.as_ref(), &motoko_info, &mut *pool.imports.borrow_mut(), pool)?;
119-
println!("CanisterInfo4: {:#?}", motoko_info.get_main_path()); // FIXME
120108

121109
Ok(pool.imports.borrow().nodes
122110
.iter()
@@ -195,8 +183,6 @@ impl CanisterBuilder for MotokoBuilder {
195183
if let Ok(wasm_file_metadata) = metadata(output_wasm_path) {
196184
let wasm_file_time = wasm_file_metadata.modified()?;
197185
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.
200186
let start = if let Some(node_index) = imports.nodes.get(&MotokoImport::Relative(motoko_info.get_main_path().to_path_buf())) {
201187
*node_index
202188
} else {
@@ -208,7 +194,6 @@ impl CanisterBuilder for MotokoBuilder {
208194
let mut import_iter = Bfs::new(&imports.graph, start);
209195
loop {
210196
if let Some(import) = import_iter.next(&imports.graph) {
211-
println!("NodeIndex {:?}", import);
212197
let imported_file = match &imports.graph[import] {
213198
MotokoImport::Canister(canister_name) => { // duplicate code
214199
if let Some(canister) = pool.get_first_canister_with_name(canister_name.as_str()) {
@@ -267,7 +252,6 @@ impl CanisterBuilder for MotokoBuilder {
267252
};
268253
if let Some(imported_file) = imported_file {
269254
let imported_file_metadata = metadata(imported_file.as_ref())?;
270-
println!("IMPORTED {}", imported_file.display()); // FIXME: Remove.
271255
let imported_file_time = imported_file_metadata.modified()?;
272256
if imported_file_time > wasm_file_time {
273257
break;

0 commit comments

Comments
 (0)