Skip to content
Discussions/App Development/How can I expose the hidden `daml-ctl` package of `contingent-claims` when using the precompiled dar?Forum ↗

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

App Development5 posts383 views4 likesLast activity Apr 2022
GY
gyorgybalazsiOP
Apr 2022

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.

RI
rikotacards
Apr 2022
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
GY
gyorgybalazsi
Apr 2022

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

CO
cocreature
Apr 2022

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

GY
gyorgybalazsi
Apr 2022
gyorgybalazsi:
build-options:
  - --package=daml-ctl-2.0.0

Thanks!

← Back to Discussions