Daml.lock file

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)
1 Like

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.)

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.

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?

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.

1 Like