Distribute and upload dependency DARs?

If I have this:

  • two Daml projects, app and lib
  • the app project depends on the lib project
  • the lib-1.0.0.dar contains the org.lib.v1 as the main package
  • the app-1.0.0.dar contains the org.app.v1 as the main package

My understanding is that the app-1.0.0.dar also contains the org.lib.v1 package.

My questions are:

  1. Must my app’s users upload both DARs to their node? Or is uploading app-1.0.0.dar sufficient?
  2. If not, should I distribute both DARs to my app’s users? Why?

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.dar is sufficient.

The main reason to distribute lib-1.0.0.dar independently is to use it in another app. Ie the distribution of lib-1.0.0.dar would be for developers of app2 rather than those deploying app or app2.