digital-asset / daml

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

Provide mechanism to override daml.yaml at CLI #17934

Open dylant-da opened 9 months ago

dylant-da commented 9 months ago

Some parts of daml.yaml affect build behaviour, esp. via build-options. It would be nice if flags to daml build and other tools could also go in the opposite direction and override configurations in daml.yaml

An example of this was given by Ivett.

Hi team! Is there a way to programmatically set the daml (project, not sdk) version in the daml.yaml file(s)? I’d like the version to be created and stamped during CI build, and not hard-coded manually upfront. Is it possible? (I only have experience with gradle, and there we passed it like, for example: gradle build -Pversion=1.0.0)

E.g. given a daml.yaml:

sdk-version: 2.7.1
name: OCTL-assertions
source: .
version: 0.0.1

we'd like to be able to set the version of the package via something like daml build --version <version> or through some other programmatic interface.

dylant-da commented 7 months ago

@samuel-williams-da @carlpulley-da This is pretty well-linked to the env var work https://github.com/digital-asset/daml/pull/18216. May be worth getting Ivett's impression on our design doc.