Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: don't recompile dependend canisters if .did did not change #3730

Closed
wants to merge 300 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
300 commits
Select commit Hold shift + click to select a range
eb491d9
refactor
vporton Apr 16, 2024
6e46a8f
it works!
vporton Apr 16, 2024
79faa77
removed unnecessary code
vporton Apr 16, 2024
8045b53
comments
vporton Apr 16, 2024
0a89fe4
attempted fix (creates another bug)
vporton Apr 16, 2024
2cbad6d
bug fix
vporton Apr 16, 2024
95b22d9
removed commented out code
vporton Apr 16, 2024
e63b7d3
half written
vporton Apr 16, 2024
b0da56f
comment
vporton Apr 16, 2024
368db99
rewriting (does not compile)
vporton Apr 16, 2024
8188d45
rewriting (does not compile)
vporton Apr 16, 2024
6e65939
rewriting (does not compile)
vporton Apr 16, 2024
31ff714
it compiled (will test)
vporton Apr 16, 2024
9cff499
it compiled (will test)
vporton Apr 16, 2024
0dbb7e5
bug fix: Dfs -> Bfs
vporton Apr 16, 2024
dab915e
bug fix (untested)
vporton Apr 16, 2024
c52b317
removed tracing
vporton Apr 16, 2024
e611bc2
removed tracing
vporton Apr 16, 2024
d7b6052
bug fix
vporton Apr 16, 2024
357a16e
bug fix
vporton Apr 16, 2024
3b60ab9
removed unused import
vporton Apr 16, 2024
a26a647
comments and removed tracing
vporton Apr 16, 2024
760ec44
removed comment
vporton Apr 16, 2024
fc6fbc6
bug fix
vporton Apr 16, 2024
d8d41c0
bug fix (not tested)
vporton Apr 16, 2024
7ab04e9
removed tracing
vporton Apr 16, 2024
030f9af
removed tracing
vporton Apr 16, 2024
bfdcfc2
removed commented out code
vporton Apr 16, 2024
d3a44e1
comment
vporton Apr 16, 2024
6819d53
bug fix (creates a new bug)
vporton Apr 16, 2024
cadd9d9
bug fix (not tested)
vporton Apr 16, 2024
0e13b8b
removed tracing
vporton Apr 16, 2024
3b6ca0f
removed tracing and comment
vporton Apr 16, 2024
9c4b04f
TODO comment
vporton Apr 16, 2024
f6ac336
misc
vporton Apr 17, 2024
453e6a6
removed extensive tracing
vporton Apr 17, 2024
a503e56
speedup by caching dependencies data
vporton Apr 17, 2024
c38088e
merged master
vporton Apr 17, 2024
7b5fe36
option not to deploy a canister
vporton Apr 17, 2024
ca5de3f
fixes
vporton Apr 17, 2024
01a851e
bug fix
vporton Apr 17, 2024
32923d6
refactor
vporton Apr 17, 2024
0fdc334
comment
vporton Apr 17, 2024
410c725
better help
vporton Apr 17, 2024
ec0a461
CHANGELOG
vporton Apr 17, 2024
c8955c4
docs
vporton Apr 17, 2024
52003bf
update dfx.json.schema
vporton Apr 17, 2024
16ad0db
cargo clippy test passed
vporton Apr 17, 2024
ac1e948
merged dont-deploy
vporton Apr 17, 2024
ef7eec9
fefactor
vporton Apr 17, 2024
2f6beed
Merge branch 'dont-deploy' into build-only-necessary
vporton Apr 17, 2024
96f6f74
removed tracing
vporton Apr 18, 2024
7615e81
function renamed, comment added
vporton Apr 18, 2024
eb65ab4
removed TODO comment
vporton Apr 18, 2024
768f786
refactoring
vporton Apr 18, 2024
6c13c38
refactor
vporton Apr 18, 2024
c02bb43
removed hard-to-do TODO comment
vporton Apr 18, 2024
970d7bd
more logging
vporton Apr 18, 2024
a66b2a5
removed superfluous Debug
vporton Apr 18, 2024
f6c0849
removed unneeded code
vporton Apr 18, 2024
d01e08e
removed hard-to-fix TODO item
vporton Apr 18, 2024
f7b1d5d
removed unused code
vporton Apr 18, 2024
a02975f
removed an outdated FIXME comment
vporton Apr 18, 2024
75692f5
removed a wrong FIXME comment
vporton Apr 18, 2024
965849e
code formatting
vporton Apr 18, 2024
e819c7f
function renamed
vporton Apr 18, 2024
382bef4
CHANGELOG correction
vporton Apr 18, 2024
25b2d4d
removed FIXME comment
vporton Apr 20, 2024
3828250
Merge remote-tracking branch 'upstream/master' into build-only-necessary
vporton Apr 20, 2024
8339f14
removed superfluous code
vporton Apr 20, 2024
e3ce033
removed a FIXME comment
vporton Apr 20, 2024
e69ae95
issue for a dependency
vporton Apr 20, 2024
7e795d9
reported an issue to petgraph
vporton Apr 20, 2024
12d08d5
TODO comment moved
vporton Apr 20, 2024
90edb6b
bug fix
vporton Apr 20, 2024
692ac94
small code adjustments
vporton Apr 20, 2024
3b723d2
rename
vporton Apr 20, 2024
577cda8
doc comment
vporton Apr 20, 2024
cb1f419
corrected code order
vporton Apr 21, 2024
ac39257
changed code order
vporton Apr 21, 2024
7e9cdc4
code formatting
vporton Apr 21, 2024
897b6f7
refactor
vporton Apr 21, 2024
87535d1
refactor
vporton Apr 21, 2024
2620184
removed old version of a function
vporton Apr 21, 2024
ea82189
mostly ready
vporton Apr 21, 2024
a16fcd6
small refactor
vporton Apr 21, 2024
964ee12
bug fix
vporton Apr 21, 2024
727b510
refactor
vporton Apr 21, 2024
3535510
bug fix
vporton Apr 22, 2024
3104ff6
removed tracing
vporton Apr 22, 2024
a07d998
bug fix
vporton Apr 22, 2024
7033768
bug fix
vporton Apr 22, 2024
9a70bbe
removed commented out code
vporton Apr 22, 2024
a62f989
comment typo
vporton Apr 22, 2024
bc800c1
bug fix
vporton Apr 22, 2024
174eaf6
code formatting
vporton Apr 22, 2024
8792959
fixes
vporton Apr 22, 2024
88f5d98
comment
vporton Apr 22, 2024
88e7b64
misc
vporton Apr 22, 2024
a8f18a2
removed tracing
vporton Apr 23, 2024
3ce3ddc
started to work on automated testing
vporton Apr 23, 2024
c1b6831
test breaking dependency compiling
vporton Apr 23, 2024
65e79f2
fix bug in tests
vporton Apr 23, 2024
18a369d
trying to rectify a test
vporton Apr 23, 2024
3b184ca
misc
vporton Apr 24, 2024
108b233
bug fix
vporton Apr 24, 2024
769f89c
misc
vporton Apr 24, 2024
cd89676
more tests
vporton Apr 24, 2024
b2c7ade
comment typo
vporton Apr 24, 2024
bf7c1c7
refactor
vporton Apr 24, 2024
280fdb7
refactor
vporton Apr 24, 2024
d4a4254
refactor
vporton Apr 24, 2024
4f9daea
refactor
vporton Apr 24, 2024
ac88641
some Clippy fixes
vporton Apr 24, 2024
6c68fc1
clippy recommendations followed
vporton Apr 24, 2024
78625ea
error noted
vporton Apr 24, 2024
b81331a
small test
vporton Apr 24, 2024
32ae10a
comment changed
vporton Apr 24, 2024
98c5251
bug fix
vporton Apr 24, 2024
656715c
tests passed
vporton Apr 24, 2024
547fcf7
merged master
vporton Apr 24, 2024
746a2fe
removed outdated FIXME comments
vporton Apr 24, 2024
8b3ce17
more logging
vporton Apr 24, 2024
4cb5f08
Merge branch 'master' into build-only-necessary-dev
vporton Apr 24, 2024
a7096f2
removed FIXME code
vporton Apr 24, 2024
b02b598
bug fix
vporton Apr 24, 2024
476cb08
refactor
vporton Apr 24, 2024
ab14e40
bug fix
vporton Apr 24, 2024
7025c46
FIXME -> TODO
vporton Apr 24, 2024
4309de1
solving FIXMEs
vporton Apr 24, 2024
2ef1d8f
removed outdated TODO
vporton Apr 24, 2024
a0e6e0c
removed TODO
vporton Apr 24, 2024
d5c219f
removed commented out line
vporton Apr 24, 2024
3885c46
followed clippy's recommendation
vporton Apr 24, 2024
aaa07b0
bug fix
vporton Apr 24, 2024
f564c44
bug fix
vporton Apr 24, 2024
6a98bb3
bug fix
vporton Apr 24, 2024
f52f76a
removed tracing
vporton Apr 24, 2024
afc0262
cargo fmt
vporton Apr 24, 2024
6307b5d
fixing a bug
vporton Apr 25, 2024
e9e196e
removed a confusing comment
vporton Apr 25, 2024
3ef1b1f
cargo fmt
vporton Apr 25, 2024
1e9d90e
bug fix
vporton Apr 25, 2024
d3b07ef
fixing bug
vporton Apr 25, 2024
41b19d1
code reorganized
vporton Apr 25, 2024
5f62f4a
temporarily disabled a test
vporton Apr 25, 2024
293c120
refactor
vporton Apr 25, 2024
2f31661
bug fixes
vporton Apr 25, 2024
f9a4228
bug fixes
vporton Apr 25, 2024
c388547
bug fix
vporton Apr 25, 2024
948bcc1
variables renamed
vporton Apr 25, 2024
09d4aa1
refactor
vporton Apr 25, 2024
428ecfd
misc
vporton Apr 25, 2024
9bc54ee
bug fix
vporton Apr 25, 2024
b3a8697
function renamed
vporton Apr 25, 2024
65dcb23
bug fix
vporton Apr 25, 2024
66129df
more tests
vporton Apr 25, 2024
741a666
bug fix
vporton Apr 25, 2024
250962a
removed tracing
vporton Apr 25, 2024
be650ac
bug fix
vporton Apr 25, 2024
4c26aa1
bug fix
vporton Apr 25, 2024
17bd807
comment
vporton Apr 25, 2024
073054a
make_like.bash tests passed
vporton Apr 25, 2024
6d06759
tracing removed
vporton Apr 25, 2024
662dbe9
debugging
vporton Apr 25, 2024
358881f
bug fixing (does not compile)
vporton Apr 25, 2024
b4ecb96
bug fix (untested)
vporton Apr 25, 2024
50ce05f
rewriting to fix a bug
vporton Apr 25, 2024
f8ca306
bug in a e2e test fixed
vporton Apr 25, 2024
7a187ba
bug in a e2e test fixed
vporton Apr 25, 2024
c855cf4
bug fix in tests
vporton Apr 26, 2024
7c5e027
tests passed
vporton Apr 26, 2024
b7f2109
more tests
vporton Apr 26, 2024
da92149
more tests
vporton Apr 26, 2024
c499e7d
fixing wrong deployment
vporton Apr 26, 2024
3b9b47b
fixing a bug
vporton Apr 26, 2024
4868c2d
bug fix
vporton Apr 26, 2024
5c535ed
removed outdated FIXME
vporton Apr 26, 2024
3b64f01
bug fix
vporton Apr 26, 2024
12b5d0c
removed an outdated TODO
vporton Apr 26, 2024
973df62
eliminate a superfluous condition
vporton Apr 26, 2024
7ab36ec
bug fix
vporton Apr 26, 2024
f150763
bug fix
vporton Apr 26, 2024
dfc8aef
removed a wrong FIXME
vporton Apr 26, 2024
c0db95b
cargo fmt
vporton Apr 26, 2024
882514b
eliminated Clippy warnings
vporton Apr 26, 2024
5ad7844
remove an outdated comment
vporton Apr 26, 2024
85f439a
don't update .did file if not changed
vporton Apr 26, 2024
e1d9e9f
ignore canisters with unchanged .did
vporton Apr 26, 2024
9097b69
docs
vporton Apr 26, 2024
83e908e
rebuild only if Candid changed
vporton Apr 26, 2024
fbf5e4e
added (failed) tests
vporton Apr 26, 2024
8bfedb8
Merge branch 'master' into build-only-necessary
vporton Apr 26, 2024
0d490ad
bug fix
vporton Apr 26, 2024
2638986
tests passed
vporton Apr 26, 2024
61f7bc3
removed tracing
vporton Apr 26, 2024
410c6df
more tests
vporton Apr 26, 2024
79f1faf
bug fix
vporton Apr 26, 2024
c595c35
merged master
vporton Apr 26, 2024
b2b48db
half-done bug fix
vporton Apr 26, 2024
4bd860b
bug fix (untested)
vporton Apr 26, 2024
c42605c
added (failing) test add_dependency.bash
vporton Apr 27, 2024
de1f6c8
Merge branch 'build-only-necessary' of github.com:vporton/sdk into bu…
vporton Apr 27, 2024
fc75b7d
English grammar
vporton Apr 27, 2024
f178964
better test
vporton Apr 27, 2024
4419e5a
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 27, 2024
f491334
Merge branch 'build-only-necessary-dev' into preserve-candid
vporton Apr 27, 2024
a918624
Merge branch 'build-only-necessary' into preserve-candid
vporton Apr 27, 2024
df9dd8d
removed an undersophisticated error
vporton Apr 27, 2024
84609b5
removed tracing
vporton Apr 27, 2024
67257e9
bug fix (introduced another bug)
vporton Apr 27, 2024
76a95d1
bug fix (introduced another bug)
vporton Apr 27, 2024
836a737
removed tracing
vporton Apr 28, 2024
af79910
alleged bug fix
vporton Apr 28, 2024
3b00420
bug fixes
vporton Apr 28, 2024
863e6b5
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 28, 2024
81ea12f
Merge branch 'build-only-necessary' into preserve-candid
vporton Apr 28, 2024
345bf4f
merged branches
vporton Apr 28, 2024
f568ffb
cargo fmt
vporton Apr 28, 2024
36b0c51
removed unused self parameter
vporton Apr 28, 2024
abd6b6f
Merge branch 'build-only-necessary-dev' into build-only-necessary
vporton Apr 28, 2024
80aac35
merge
vporton Apr 28, 2024
6b3a965
make #3733 bug repeatable
vporton Apr 29, 2024
d3a8812
dfx.json simplified
vporton Apr 29, 2024
14262e4
removed unused source files from sample code
vporton Apr 29, 2024
2fdf11b
simplified sample code
vporton Apr 29, 2024
7ad5e49
yet simplified sample code
vporton Apr 29, 2024
5e5a8de
removed unnecessary configuration from sample
vporton Apr 29, 2024
b39ac77
created a minimal example for bug #3733
vporton Apr 29, 2024
4965c02
renamed
vporton Apr 29, 2024
b27c8a2
Merge remote-tracking branch 'upstream/master' into dont-deploy
vporton Apr 29, 2024
ffd9b4e
merge upstream
vporton May 4, 2024
9a21ebf
merged master
vporton May 6, 2024
9fb8c37
fixing an error (does not compile now)
vporton May 6, 2024
08e4204
made compilable
vporton May 6, 2024
0770004
test wrong_ids.bash passed
vporton May 6, 2024
224fa18
simplified
vporton May 6, 2024
ec41d45
removed tracing
vporton May 6, 2024
8b416b3
removed unused variable
vporton May 6, 2024
16330bc
added test broken_canister_dep.bash
vporton May 6, 2024
8aa8c63
passed a e2e test
vporton May 6, 2024
975c274
Merge branch 'build-only-necessary-dev' into preserve-candid
vporton May 6, 2024
acdf371
CHANGELOG
vporton May 7, 2024
f4fad29
trying to fix bugs
vporton May 7, 2024
544b1a9
misc
vporton May 7, 2024
6c78437
removed tracing
vporton May 7, 2024
0f6fd14
code formatting
vporton May 7, 2024
559869a
cargo fmt & cpilly
vporton May 7, 2024
eed2047
attempted bug fix in `dfx build`
vporton May 7, 2024
c0a7a86
bug fix
vporton May 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bug fix (creates a new bug)
  • Loading branch information
vporton committed Apr 16, 2024
commit 6819d531e5747fd722be23731150b46afaf2bb2b
12 changes: 11 additions & 1 deletion src/dfx/src/lib/models/canister.rs
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ use crate::lib::builders::{
custom_download, BuildConfig, BuildOutput, BuilderPool, CanisterBuilder, IdlBuildOutput,
WasmBuildOutput,
};
use crate::lib::canister_info::motoko::MotokoCanisterInfo;
use crate::lib::canister_info::CanisterInfo;
use crate::lib::environment::Environment;
use crate::lib::error::{BuildError, DfxError, DfxResult};
@@ -576,13 +577,22 @@ impl CanisterPool {

let real_canisters_to_build = match canisters_to_build {
Some(canisters_to_build) => canisters_to_build,
None => self.canisters.iter().map(|canister| canister.get_name().to_string()).collect(),
None => self.canisters.iter().filter_map(
|canister| if canister.get_info().as_info::<MotokoCanisterInfo>().is_ok() { // TODO: Isn't this check too strong? We can depend on a Rust canister for instance.
Some(canister.get_name().to_string())
} else {
None
}).collect(),
};
// let real_canisters_to_build = real_canisters_to_build.iter().collect(); // hack
let source_graph = &self.imports.borrow().graph;
let source_ids = &self.imports.borrow().nodes;
println!("source_ids: {:?}", source_ids.keys());
println!("real: {:?}", real_canisters_to_build);
let start: Vec<_> =
real_canisters_to_build.iter().map(|name| MotokoImport::Canister(name.clone())).collect(); // `clone` is inefficient.
// FIXME: Next line may fail on `dfx build -vv --all`.
println!("start: {:?}", start);
let start: Vec<_> = start.into_iter().map(|node| *source_ids.get(&node).unwrap()).collect();
// Transform the graph of file dependencies to graph of canister dependencies.
// For this do DFS for each of `real_canisters_to_build`.