How to know more about DFX Deps

Hi,

On DFX 14.1 (two weeks ago), it was released the sub command “deps”, which I think is really cool and useful!

I want to give it a try on a project I am in, but I am not finding any deeper explanation / reference or guide.

Have searched on internet computer:

Have searched on this forum, no topic that I could find, (either forum search or google search).

My only luck was indeed on the github repo, the very files that have the subcommand codes:

They already have some answers (eg.: that pull command defaults to mainnet, and that can handle the local network as well).

But I am still wondering how to properly use this (which I will probably discover on my own), but still think it’s important to clarify on a guide:

  • what use cases does it currently address?
  • what does dfx deps pull actually fetches (just the metadata / types / candid or the actual wasm?)
  • dfx deps deploy will deploy exactly what? (it would be really cool if it was the wasm itself)
  • how does it handle dependencies of the dependencies?
  • how should we deal with updates? (I am guessing a simple re-pull and re-deploy would do)
  • how should we use this info in our projects (is it possible to use the …/…/declarations as we do for _backend canister? is it possible, in motoko, to do import “canister:some_cool_deps”?)

I will now be discovering it on my own, but since this feature has the potential to profoundly changing the development habits (and making it so much easier to use external services), think the community would really value having more docs about the topic.

Thanks,
Tiago

1 Like

So far the feature is implemented, but it requires support from canisters. @lwshang is working on getting an example canister fit for pulling with dfx deps and will then provide detailed instructions how to get other canisters ready.

I’ll answer your questions to the best of my abilities

All of it, but it can be other/modified from production since it may be more appropriate to have a dev version locally. E.g. Internet Identity is usually run locally with a disabled captcha. Or a DEX may want to supply some initial state with a dummy swap pool already pre-configured

Whatever is provided in the previous step. Can be the production wasm, or something else

Just fine

Integrating with these canisters works the same as with all other canisters. Just the way you get them to your local replica is different.

1 Like

Thanks @Severin ,

You are always so helpful! :sweat_smile:

Ah, it needs to be set up on the side of the canister (so that it can be pulled), just like packages.

Really cool, this is very promising, for sure let’s give it enough time to prepare, we will all be watching for updates :+1:

Thanks and have a great day!

2 Likes

The example project is available at:

https://github.com/lwshang/pullable

It provides instructions for both service providers and consumers.

2 Likes