Open Michael-F-Bryan opened 2 years ago
Hey @Michael-F-Bryan , wapm currently requires the wasm files to be under the same directory or nth-child of the wapm.toml
Basically, you can have
wapm.toml
anydir/atanylevel/mymodule.wasm
Or at the base level
wapm.toml
base.wasm
But not one level below
Oh yeah, I figured out what the cause of the error was. That's not an issue.
To rephrase this in a different way, if you have to go by just the error's message ("Error building package when parsing module cuboid-model
"), there is no way to resolve the problem other than blindly changing your wapm.toml
until it works.
Yeah, you are completely right. We should return a proper error there!
I still have the same issue, in my case I'm using WAI and I tried to use a WAI file in the parent directory (bindings = { wai-version = "0.2.0", exports = "../greeter.wai" }
) and it just fails with:
Error: Error building package when parsing module "english-rs".
Error: Unable to publish "english-rs"
Caused by:
The wapm CLI exited unsuccessfully with exit code 255
The error could be clearer...
Describe the bug
The error message that gets printed when
wapm
can't parse awapm.toml
file give the user no way of fixing the parse error.Given the following
wapm.toml
:Trying to publish it then says it was unable to parse the
cuboid-model
module, but doesn't actually say what was wrong with the module or how I can fix it.Expected behavior
I would expect the
wapm
CLI to tell me why it was unable to build the package. In this case, the error message would probably look like:Additional context