Investigate clippy failure on example-shader with glam
repi opened this issue · 3 comments
Running clippy on example-shader
after the glam conversion in #149 results in:
Compiling example-shader v0.1.0 (/home/runner/work/rust-gpu/rust-gpu/examples/example-shader)
error: constant runtime array value
https://github.com/EmbarkStudios/rust-gpu/pull/149/checks?check_run_id=1326417262
it is from our codegen but not sure how we are getting it and needs further investigation
The actual failure is due to panicking with a string, and strings are not supported yet. I added a quick ignored test as a reminder to implement it eventually.
rust-gpu/crates/spirv-builder/src/test/basic.rs
Lines 37 to 48 in 0b5ddb6
But for why clippy generates code that panics with a string, but normal builds don't, that I have no idea on. I tried investigating for a few hours, and came up with nothing.
I think I managed to get this problem also when building the shader in debug (so not using --release
), which likely introduces debug asserts with strings also
I think this is probably fixed with eddyb's work