Skip to content
CCPEDIAby Unity Nodes
App Development

How can I expose the hidden `daml-ctl` package of `contingent-claims` when using the precompiled dar?

5 posts423 views4 likesLast activity Apr 2022

  1. gyorgybalazsiOP

    I want to use the precompiled dar of the contingent-claims (CC) library, downloaded from here: Releases · digital-asset/contingent-claims · GitHub

    The CC library uses as dependency the daml-ctl library, but I guess it’s already packaged in the CC dar. Is that right?

    When I try to use a module from the daml-ctl library, I get this message:

    image

    How can run :set package daml-ctl ?

    This seems to be a GHCI command.

  2. rikotacards
    gyorgybalazsi:

    :set package daml-ctl

    Not entirely sure on this one, but saw another thread here where perhaps you can manually expose the dep you need.

    You can also manually expose transitive deps by adding --package flags, e.g., build-options: - --package=nameofdep-versionofdep
  3. gyorgybalazsi

    Thanks, tried and doesn’t seem to work. I think I’m doing something wrong.

    Again: I only have the contingent-claims dar in my lib folder (more precisely, this time, unlike in the original question, contingent-claims-test, which contains the modules of the original contingent-claims library and also examples).

    With this in the daml.yaml

    sdk-version: 2.1.0
    name: sandbox
    source: daml
    init-script: Main:setup
    version: 0.0.1
    dependencies:
      - daml-prim
      - daml-stdlib
      - daml-script
    data-dependencies:
      - ../lib/contingent-claims-test-2.0.0.dar
    build-options:
      - --package=daml-ctl-2.0.0
    

    the daml build succeeds, but I get the following error:

    image

    Maybe @cocreature can help, based on his answer in the thread Problem with transitive dependencies - #2 by akrmn

  4. cocreature 2

    You need to restart the language server after changes to dependencies. Ctrl/Cmd-Shift-P → reload window is what I usually use for that.

  5. gyorgybalazsi 2
    gyorgybalazsi:
    build-options:
      - --package=daml-ctl-2.0.0
    

    Thanks!