Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #118

Open
HamzaKarh opened this issue Aug 19, 2022 · 0 comments
Open

[BUG] #118

HamzaKarh opened this issue Aug 19, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@HamzaKarh
Copy link

HamzaKarh commented Aug 19, 2022

Issue description

When trying to deploy a contract that implements another contract as a dependency to LocalTerra, the rust optimizer fails

Steps to reproduce the issue

When trying to deploy a contract using terrain

[dependencies]
mycontract = { path="../mycontract", version = "0.1.0", features=["library"]}
$ terrain deploy mymaincontract --signer validator

Result :

Building contract in /code ...
error: failed to get `mycontract` as a dependency of package `mymaincontract v0.1.0 (/code)`

Caused by:
  failed to load source for dependency `mycontract`

Caused by:
  Unable to update /mycontract

Caused by:
  failed to read `/mycontract/Cargo.toml`

Caused by:
  No such file or directory (os error 2)
node:internal/errors:841
  const err = new Error(message);
              ^

Error: Command failed: docker run --rm -v "$(pwd)":/code       --mount type=volume,source="mymaincontract_cache",target=/code/target       --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry       cosmwasm/rust-optimizer:0.12.6
    at checkExecSyncError (node:child_process:828:11)
    at Object.execSync (node:child_process:899:15)
    at execDockerOptimization (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/lib/lib/deployment.js:30:21)
    at optimizeContract (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/lib/lib/deployment.js:40:5)
    at Object.exports.optimize (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/lib/lib/deployment.js:53:9)
    at Object.exports.storeCode (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/lib/lib/deployment.js:60:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Deploy.run (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/lib/commands/deploy.js:43:28)
    at async Deploy._run (/home/kargath/.nvm/versions/node/v16.16.0/lib/node_modules/@terra-money/terrain/node_modules/@oclif/command/lib/command.js:43:20) {
  status: 101,
  signal: null,
  output: [ null, null, null ],
  pid: 52532,
  stdout: null,
  stderr: null
}


Any insights?
Thank you !

@HamzaKarh HamzaKarh added the bug Something isn't working label Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant