gfx-rs / wgpu

A cross-platform, safe, pure-Rust graphics API.
https://wgpu.rs
Apache License 2.0
12.76k stars 935 forks source link

wasm-pack test broken #5797

Open codewiz opened 5 months ago

codewiz commented 5 months ago

Description

The recommended command-line to run tests with WebGL fails to parse the top-level Cargo.toml file:

~/src/wgpu% wasm-pack test --headless --chrome --no-default-features --features webgl --workspace
Error: failed to parse manifest: /home/bernie/src/wgpu/Cargo.toml
Caused by: failed to parse manifest: /home/bernie/src/wgpu/Cargo.toml
Caused by: TOML parse error at line 1, column 1
 1 | [workspace]
   | ^ missing field `package`

Platform

cwfitzgerald commented 5 months ago

You need cd into any crate first. wasm-pack test can't deal with a virtual workspace.

cwfitzgerald commented 5 months ago

We should better document this.

kpreid commented 5 months ago

You need cd into any crate first.

Tiny nitpick: cd isn't strictly necessary; you can also do wasm-pack test <flags> some-package-directory/.

GopherJ commented 3 months ago

On my side, wasm-pack headless test cannot succeed to request adapter, while in browser it fails to compute on gpu with a BufferAsyncError