Skip to content

Commit

Permalink
fix: Compute Motoko dependencies in linear (not exponential) time by …
Browse files Browse the repository at this point in the history
…detecting visited imports (#2647)

* add import before descending, to prevent exponential revisting of imports

* reorder check

* formatting

* revert ref

* edit changelog
  • Loading branch information
crusso authored Oct 5, 2022
1 parent c03c3c5 commit 8deb431
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## DFX

### fix: Compute Motoko dependencies in linear (not exponential) time by detecting visited imports.

### fix(generate): add missing typescript types and fix issues with bindings array in dfx.json

### chore: update Candid UI canister with commit 79d55e7f568aec00e16dd0329926cc7ea8e3a28b
Expand Down
2 changes: 2 additions & 0 deletions src/dfx/src/lib/builders/motoko.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ impl CanisterBuilder for MotokoBuilder {
return Ok(());
}

result.insert(MotokoImport::Relative(file.to_path_buf()));

let mut command = cache.get_binary_command("moc")?;
let command = command.arg("--print-deps").arg(&file);
let output = command
Expand Down

0 comments on commit 8deb431

Please sign in to comment.