# Cannot find dependency for refapp ex-bond-issuance in the lib-finance library

**URL:** <https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475>\
**Category:** App Development\
**Created:** [May 15, 2020, 9:33am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475 "2020-05-15T09:33:20Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 9:33am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/1 "2020-05-15T09:33:20Z")

</div>

I would like to check out the ex-bond-issuance refapp ([GitHub - digital-asset/ex-bond-issuance: Reference DAML application demonstrating a bond issuance use case.](https://github.com/digital-asset/ex-bond-issuance)).

Some dependencies are supposed to be in the lib-finance library ([GitHub - digital-asset/lib-finance](https://github.com/digital-asset/lib-finance)).

I have copied the lib-finance library into the project as instructed in the README.

In this way, this import instruction is OK:

`import DA.Finance.Types`

But other dependencies cannot be found:

```haskell
import DA.Finance.Fact.Asset
import DA.Finance.Rule.Asset

```

Where are these?

Thanks

---

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [May 15, 2020, 10:27am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/2 "2020-05-15T10:27:18Z")

</div>

The bond reference app was built against an older version of the Finance Library. It seems the instructions are outdated. @gaborh can you maybe help?

---

<div class="post-metadata">

**Author:** ![gaborh](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gaborh/32/177_2.png) [@gaborh](https://forum.canton.network/u/gaborh)\
**Post date:** [May 15, 2020, 10:37am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/3 "2020-05-15T10:37:55Z")

</div>

I think the README is wrong in its current form. I am fixing it and getting back to you.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 11:26am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/4 "2020-05-15T11:26:41Z")

</div>

Thank you!

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 11:45am UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/5 "2020-05-15T11:45:08Z")

</div>

Or maybe in the /ex-bond-issuance/src/main/daml/DA/RefApps/Bond/Roles/CentralBankRole.daml file these two imports

```haskell
import DA.Finance.Fact.Asset
import DA.Finance.Rule.Asset

```

should be replaced by one import

`import DA.Finance.Asset` ?

In the root folder of the lib-finance library, there is an Asset.daml file.

---

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [May 15, 2020, 1:25pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/6 "2020-05-15T13:25:42Z")

</div>

According to [this script](https://github.com/digital-asset/ex-bond-issuance/blob/c55e0660435bd91be5cc6f06dcd2503dd196d89b/scripts/getfinlib.py), you should be copying in [this commit](https://github.com/digital-asset/lib-finance/tree/c9284704da890fa08ce96624f51ff997512711c4) from the finance library. Can you try that?

---

<div class="post-metadata">

**Author:** ![Tamas\_Kalcza](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/tamas_kalcza/32/1788_2.png) [@Tamas\_Kalcza](https://forum.canton.network/u/Tamas_Kalcza)\
**Post date:** [May 15, 2020, 1:43pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/7 "2020-05-15T13:43:46Z")

</div>

As @gaborh mentioned, the README was not up-to-date, apologies for that. A PR is on the way to fix it.

In the meantime You can fix this issue by doing any of the following:

1. Option A

```shell
mvn clean package

```

2. Option B

```shell
python ./scripts/getfinlib.py 1.1.1

```

After running one of these you should have the necessary finlib in place, i.e. `target/finlib-master-sdk-1.1.1.dar`.

After that you should be able to start app in standalone mode or using `docker-compose up --build`.

---

<div class="post-metadata">

**Author:** ![gaborh](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gaborh/32/177_2.png) [@gaborh](https://forum.canton.network/u/gaborh)\
**Post date:** [May 15, 2020, 3:12pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/8 "2020-05-15T15:12:38Z")

</div>

Please check latest master, README is updated (hash: fa424266).

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 4:00pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/9 "2020-05-15T16:00:06Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 4:00pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/10 "2020-05-15T16:00:52Z")

</div>

Yes, thank you!

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [May 15, 2020, 4:06pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/11 "2020-05-15T16:06:10Z")

</div>

@georg what do you think is the best way to include the lib-finance library if I wat to create a new project using it?

Using this script or copying the folder into my project?

---

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [May 15, 2020, 5:18pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/12 "2020-05-15T17:18:19Z")

</div>

I would recommend to check in the DAR and reference that via a relative path in `dependencies` / `data-dependencies`. Then `daml build` works without any extra steps and you also don’t accidentally recompile your dependency which can change the package id and thereby invalidate all references to old templates.

---

<div class="post-metadata">

**Author:** ![georg](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/georg/32/368_2.png) [@georg](https://forum.canton.network/u/georg)\
**Post date:** [May 16, 2020, 2:04pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/13 "2020-05-16T14:04:25Z")

</div>

Yep, what @cocreature said. For now best is to check out the `lib-finance` repo, compile once, and check in the DAR into your repo. We’re working towards being able to pull this in in a nicer way.

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [June 3, 2020, 12:10pm UTC](https://forum.canton.network/t/cannot-find-dependency-for-refapp-ex-bond-issuance-in-the-lib-finance-library/475/14 "2020-06-03T12:10:02Z")

</div>

Thank you!
