DAML archive name (daml build)

Hello all,

Probably a noob question; how do I specify the name of the generated .dar file from daml build. When creating a project with daml new <name>, the name of the .dar is <name>-<version>.dar. However, when creating the project with daml new <name> create-daml-app the .dar is named create-daml-app-<version>.dar. In short, I would like to use create-daml-app to get me going with a React/DAML app, but want the .dar to be named after my project name.

Thanks

…never mind, think it is specified in daml.yaml!

1 Like

There are two ways to change it:

  1. Change the name option in your daml.yaml. That will put the DAR in .daml/dist/<yourprojectname>-version.dar. It will also control the package name used in the DALF.
  2. Pass the path explicitly via -o path/to/your.dar Here you can choose the path freely.

I would recommend to always do 1 and then if you need a specific location specify -o in addition to that.
For some templates daml new will also automatically set the name to the directory you created but that is not the case for the create-daml-app template. Note that there might be some other references, e.g., in the typescript code to the name create-daml-app that you will also need to update.

Can we update create-daml-app to take the directory name into account, or is there a good reason why we don’t do that?

The main reason is that there are other references to it, e.g., in the package.json which are more tricky to update given our current scheme.

Thank you for the replies! Yes I later realised the reason for this was as @cocreature described; that are a few things in UI source etc that use the name create-daml-app

No promise on timeline, but if you want a notification when this is fixed, you can track this issue.