Distribute and upload dependency DARs?
- WallaceKellyOP
If I have this:
- two Daml projects,
appandlib - the
appproject depends on thelibproject - the
lib-1.0.0.darcontains theorg.lib.v1as the main package - the
app-1.0.0.darcontains theorg.app.v1as the main package
My understanding is that the
app-1.0.0.daralso contains theorg.lib.v1package.My questions are:
- Must my app’s users upload both DARs to their node? Or is uploading
app-1.0.0.darsufficient? - If not, should I distribute both DARs to my app’s users? Why?
- two Daml projects,
- bernhard 1
The DARs produced by the Daml SDK are “fat” in the sense that they are transitively closed. So your understanding is correct.
By default, uploading a package to a node vets all packages included so to your question 1, uploading
app-1.0.0.daris sufficient.The main reason to distribute
lib-1.0.0.darindependently is to use it in another app. Ie the distribution oflib-1.0.0.darwould be for developers ofapp2rather than those deployingapporapp2.