hirosystems/clarinet

Deployment plan misses dependency

obycode opened this issue · 3 comments

Describe the bug
In this repo when Clarinet generates a deployment plan, it fails to deploy the util contract before the asset-manager contract, causing:

error: use of unresolved contract 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.util'

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo: git@github.com:CyrusVorwald/balanced-clarity-contracts.git
  2. Checkout the commit with the error: git checkout ef385bb57738de731902c6a372e77646ee281f87
  3. Run the check: clarinet check
  4. See error

Expected behavior
This dependency should be detected and the contracts should be deployed in the correct order.

cross posting from the discord:

i have the same issue in this project and commit CyrusVorwald/xcall-clarity-contracts@ca75c11

i ran clarinet check which added util at the end of deployments/default.simnet-plan.yaml. i manually moved it to the start of the list, but it still has the same error. also, i am importing other contracts (ie rlp-decode) without error and that is at the bottom of the list

i ran npm test which moved it to the bottom of the list and in both cases the error use of unresolved contract 'ST1PQHQKV0RJXZFY1DGX8MNSNYVE3VGZJSRTPGZGM.util' occurs

it seems that if i copy over util into the contract that's importing it and call directly from there, and then undo those changes, it works

I'll have a look this week