Skip to content

Commit 7744db5

Browse files
committed
read only these --print-deps dependencies that are necessary
1 parent 1fe1a1b commit 7744db5

File tree

4 files changed

+2
-8
lines changed

4 files changed

+2
-8
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
### feat: rebuild only necessary canisters
66

7+
Read only those `--print-deps` dependencies that are necessary to read.
8+
79
Don't compile canisters for which all dependencies are elder than the `.wasm` file.
810
This results in big compilation speedups.
911

src/dfx/src/commands/deps/pull.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ async fn resolve_all_dependencies(
8282
) -> DfxResult<Vec<Principal>> {
8383
let mut canisters_to_resolve: VecDeque<Principal> =
8484
pull_canisters_in_config.values().cloned().collect();
85-
println!("canisters_to_resolve: {:?}", canisters_to_resolve); // FIXME: Remove.
8685
let mut checked = BTreeSet::new();
8786
while let Some(canister_id) = canisters_to_resolve.pop_front() {
8887
if !checked.contains(&canister_id) {

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ fn get_imports(cache: &dyn Cache, info: &MotokoCanisterInfo) -> DfxResult<BTreeS
7979
Ok(())
8080
}
8181

82-
// FIXME: Remove.
83-
println!("Getting imports for canister {}.", info.get_main_path().display());
84-
// println!("Custom backtrace: {}", std::backtrace::Backtrace::force_capture());
85-
8682
let mut result = BTreeSet::new();
8783
get_imports_recursive(cache, info.get_main_path(), &mut result)?;
8884

@@ -97,7 +93,6 @@ impl CanisterBuilder for MotokoBuilder {
9793
info: &CanisterInfo,
9894
) -> DfxResult<Vec<CanisterId>> {
9995
let motoko_info = info.as_info::<MotokoCanisterInfo>()?;
100-
println!("get_dependencies: {}", info.get_name()); // FIXME: Remove.
10196
let imports = get_imports(self.cache.as_ref(), &motoko_info)?; // TODO: slow operation
10297

10398
Ok(imports

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ use ic_wasm::metadata::{add_metadata, remove_metadata, Kind};
2121
use ic_wasm::optimize::OptLevel;
2222
use itertools::Itertools;
2323
use petgraph::graph::{DiGraph, NodeIndex};
24-
use petgraph::visit::Bfs;
2524
use rand::{thread_rng, RngCore};
2625
use slog::{error, info, trace, warn, Logger};
2726
use std::cell::RefCell;
@@ -531,7 +530,6 @@ impl CanisterPool {
531530
/// Build only dependencies relevant for `canisters_to_build`.
532531
#[context("Failed to build dependencies graph for canister pool.")]
533532
fn build_dependencies_graph(&self, canisters_to_build: Option<Vec<String>>) -> DfxResult<DiGraph<CanisterId, ()>> {
534-
println!("build_dependencies_graph"); // FIXME: Remove.
535533
let mut graph: DiGraph<CanisterId, ()> = DiGraph::new();
536534
let mut id_set: BTreeMap<CanisterId, NodeIndex<u32>> = BTreeMap::new();
537535

0 commit comments

Comments
 (0)