wgpu icon indicating copy to clipboard operation
wgpu copied to clipboard

`parse_example_wgsl` test not actually checking examples?

Open Imberflur opened this issue 1 year ago • 4 comments

https://github.com/gfx-rs/wgpu/blob/f735f57f89bef92896a5421a750f8bff7531fd81/naga/tests/example_wgsl.rs#L8-L18

This looks for CARGO_MANIFEST_DIR/examples but CARGO_MANIFEST_DIR is the package folder not the workspace folder.

I put a panic in the Err arm and it causes the test to fail. Is there are reason this logs an error rather than failing the test when the expected path can't be found?

Imberflur avatar Apr 13 '24 22:04 Imberflur

Looking at git log it seems it was moved around a couple of times.

I'm not sure why we need this test though. It was originally added to test that the shaders in the examples dir are valid, but the examples implicitly check this since those shaders are used by them.

I think we should just remove it. @gfx-rs/wgpu thoughts on this?

teoxoy avatar Apr 15 '24 18:04 teoxoy

+1 for removal!

ErichDonGubler avatar Apr 15 '24 20:04 ErichDonGubler

The only potential issue this can catch is any of the examples which don't have execution tests won't have their shaders tested by CI

cwfitzgerald avatar Apr 16 '24 20:04 cwfitzgerald

Do we have any shaders that are not actually used by examples?

teoxoy avatar Apr 17 '24 14:04 teoxoy