You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can see the following error messages by make build.
(cd app && fastly compute build)
✓ Initializing...
✓ Verifying package manifest...
✓ Verifying local rust toolchain...
✗ Building package using rust toolchain...
ERROR: copying wasm binary: cannot read source file: /Users/goro-fuji/ghq/github.com/fastly/ecp-workspace-example/app/target/wasm32-wasi/release/fastly-template-rust-default.wasm.
If you believe this error is the result of a bug, please file an issue: https://github.com/fastly/cli/issues/new?labels=bug&template=bug_report.md
I'm using Cargo workspaces to test the core logic in my local machine, but it seems that fastly compute build cannot recognize the workspace project.
Good news: cargo test -p core works! 🎉
The text was updated successfully, but these errors were encountered:
The cli is currently looking for a target/ inside the package directory, and using cargo's workspaces feature breaks this assumption. Per @alexcrichton there are two ways to go about fixing this:
use cargo metadata --format-version 1 and parse out the target_directory field (e.g. | jq .target_directory). The downside is this can sometimes take ~100ms or so.
build with cargo build --message-format=json and parse the file paths out of the output.
Version
What happened
Build failure with a project using Cargo workspaces.
A minimum project to reproduce this problem: https://github.com/fastly/ecp-workspace-example
You can see the following error messages by
make build
.I'm using Cargo workspaces to test the
core
logic in my local machine, but it seems thatfastly compute build
cannot recognize the workspace project.Good news:
cargo test -p core
works! 🎉The text was updated successfully, but these errors were encountered: