On the future roadmap for DFX

I implemented: Speed up DFX by recompiling only changed canisters - #6 by qwertytrewq (please review this project for me to receive a $5K grant from DFINITY). See the PR: feat: rebuild only necessary canisters by vporton · Pull Request #3710 · dfinity/sdk · GitHub

Should dfx deploy X deploy all canisters on which X depends, even if they were not recompiled? If not so, then how should it decide which canisters to deploy? (E.g. only X? or all recompiled canisters?) Please give argumented answers.

dfx deploy --with-deps X could also work if there’s a usecase for that. Personally I usually only want to deploy all or one.

Generally the design philosophy we use in dfx is to do more work if it means that things are more likely to work. In this case I would say the do more approach is to deploy everything because if you change a dependency and then your canister in response to it then you want both changes deployed.

Another way to look at it is dfx deploy vs other commands. dfx deploy is a do-everything-for-me-i-dont-care-that-much-about-details command. dfx canister create, dfx build, and dfx canister install are the ones people should use for fine-grained control. In this spirit I think dfx deploy should try to deploy everything (it won’t redeploy if the wasm hash is unchanged unless you add --upgrade-unchanged anyways). If you really want nothing else to change then I think users should use dfx canister install instead

1 Like