Skip to content
Discussions/App Development/Daml.lock fileForum ↗

Daml.lock file

App Development5 posts223 views2 likesLast activity Aug 2022
KA
kayvankOP
Aug 2022

How may I create the daml.lock file as part of the build process?
The documentation refers to daml.lock , however, I have not been able to generate this file using daml build, not did I see any relevant CLI parameter for daml build --help

SDK versions:
  1.18.1
  2.3.2   (default SDK version for new projects)
ST
Stephen
Aug 2022

I believe the lockfile is only created if you are using data-dependencies. Note that in the example, the lockfile only contains an entry for foo, the example data-dependency. Are you using them? (Sharing your daml.yaml might be useful if you are, for further diagnosis.)

CO
cocreature
Aug 2022

Specifically, it is only created if you use the remote dependencies feature. If you just reference DAR files there is no lock file being created.

KA
kayvank
Aug 2022

Thank you.
What I am really after is a way to associate the packageId of built dar file with the code base in github. I understand I can use dmal api:
daml damlc inspect-dar --json daml/.packages/eleox/.daml/dist/mydarfile-0.0.1.dar | jq '.main_package_id'
to do this, but was hoping to be able to leverage the build daml somehow!
Is there any best practice or recommendation around that please?

CO
cocreature
Aug 2022

daml damlc inspect-dar --json is what I recommend here if you just need access to the package id.

However, in a lot of cases you might want to use the Java or typescript codegens and those usually provide you with some way to access template ids and therefore also the package id.

← Back to Discussions