digital-asset / daml

The Daml smart contract language
https://www.digitalasset.com/developers
797 stars 201 forks source link

Tracking: Feedback on multi-package Daml functionality #18153

Open carlpulley-da opened 8 months ago

carlpulley-da commented 8 months ago

Tracking ticket on potential issues and Slack discussion regarding issues encountered with integrating multi-package functionality into Gradle

carlpulley-da commented 8 months ago

To simplify dependency package management in multi-package projects, it would be very useful if the daml.yaml files supported environment variables.

That way build systems (e.g. Gradle, sbt, etc) could pass in environment variables defining module/project paths. This would then allow easier looking paths rather than the noisier looking ../ prefixes.

In addition, having environment variables set by the location of a parent multi-package.yaml file might also help eliminate some of the path noise when defining package path dependencies.

Wider use of environment variables could allow some DRYing up of SDK package versions.

Ref slack conversation:

carlpulley-da commented 8 months ago

Improve documentation around using DAML_SDK_VERSION for CI environments where a bootstrapping daml SDK is initially required. Documentation should prefer this approach over the use of a daml.yaml against the multi-package.yaml file.

Ref slack conversation:

carlpulley-da commented 8 months ago

Multi-package support for daml test is currently missing.

Work arounds are either:

carlpulley-da commented 8 months ago

Multi-package testing (when supported) could do with improved dar file test integration. At the moment, one has to know to use daml script (with the right magic CLI options) in order to run a test dar file.

Doing this would encourage end users to separate script code out of their main dars and into test dars.

Ref slack conversation: