Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Gracefully handle toml parse errors #19

Open
armaniferrante opened this issue Nov 11, 2018 · 2 comments
Open

Gracefully handle toml parse errors #19

armaniferrante opened this issue Nov 11, 2018 · 2 comments

Comments

@armaniferrante
Copy link
Contributor

armaniferrante commented Nov 11, 2018

@pro-wh ran into the following when trying to compile a contract

Compiling ./contracts/Migrations.sol...
Writing artifacts to ./build/contracts

Compiling /project/oasis-box/contracts/proofs...
(node:1727) UnhandledPromiseRejectionWarning: error: failed to parse manifest at `/project/oasis-box/contracts/proofs/Cargo.toml`

Caused by:
  virtual manifests must be configured with [workspace]

(node:1727) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:1727) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

We should give a more informative error message.

Cargo.toml triggering this:

[dependencies]
owasm-ethereum = "0.7"
owasm-abi = "0.1"
owasm-abi-derive = "0.1"
@armaniferrante
Copy link
Contributor Author

Solution:

Add a package section, for example,

[package]
name = "wasm-counter"
version = "0.1.0"
authors = ["Oasis Labs Inc. <info@oasislabs.com>"]

@pro-wh
Copy link
Member

pro-wh commented Nov 12, 2018

the tutorial is updated so that it uses a command to generate a skeleton Cargo.toml that already includes a working [package] section

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants