Rust-GPU / Rust-GPU/rust-gpu

[Migrated] `cargo clippy` breaks the nested `cargo build` from `spirv-builder`.

Open
#111 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3.4k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/864
Old labels: t: bug
Originally creatd by hatoo on 2022-04-16T15:06:01Z


Expected Behaviour

cargo clippy works without a crash in this project.

It worked fine in older rust-gpu.

Example & Steps To Reproduce
  1. Clone this
  2. cargo clippy
  3. Got error
PS C:\Users\hato2\Desktop\zenn-content\rasterization-example> cargo clippy
   Compiling rasterization-example v0.1.0 (C:\Users\hato2\Desktop\zenn-content\rasterization-example)
error: failed to run custom build command for `rasterization-example v0.1.0 (C:\Users\hato2\Desktop\zenn-content\rasterization-example)`

Caused by:
  process didn't exit successfully: `C:\Users\hato2\Desktop\zenn-content\rasterization-example\target\debug\build\rasterization-example-bf4f4e1cfd480af7\build-script-build` (exit code: 1)
  --- stderr
     Compiling core v0.0.0 (C:\Users\hato2\.rustup\toolchains\nightly-2022-04-11-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\core)
     Compiling rustc-std-workspace-core v1.99.0 (C:\Users\hato2\.rustup\toolchains\nightly-2022-04-11-x86_64-pc-windows-msvc\lib\rustlib\src\rust\library\rustc-std-workspace-core)
     Compiling compiler_builtins v0.1.70
     Compiling libm v0.2.1
     Compiling bitflags v1.3.2
     Compiling spirv-types v0.4.0-alpha.12 (https://github.com/EmbarkStudios/rust-gpu.git#11e21c64)
     Compiling num-traits v0.2.14
     Compiling glam v0.20.2
     Compiling spirv-std v0.4.0-alpha.12 (https://github.com/EmbarkStudios/rust-gpu.git#11e21c64)
     Compiling shader v0.1.0 (C:\Users\hato2\Desktop\zenn-content\rasterization-example\shader)
  thread 'rustc' panicked at 'not yet implemented', C:\Users\hato2\.cargo\git\checkouts\rust-gpu-e0a37a82a46176e6\116bf9c\crates\rustc_codegen_spirv\src\codegen_cx\mod.rs:564:9
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
  error: internal compiler error: unexpected panic

  note: the compiler unexpectedly panicked. this is a bug.

  note: we would appreciate a bug report: https://github.com/EmbarkStudios/rust-gpu/issues/new

  note: rustc 1.62.0-nightly (1f7fb6413 2022-04-10) running on x86_64-pc-windows-msvc

  note: compiler flags: --crate-type lib --crate-type dylib -C opt-level=3 -C embed-bitcode=no -Z unstable-options -Z codegen-backend=C:\Users\hato2\Desktop\zenn-content\rasterization-example\target\debug\rustc_codegen_spirv.dll -C symbol-mangling-version=v0

  note: some of the compiler flags provided by cargo are hidden

  query stack during panic:
  end of query stack
  note: `rust-gpu` version 0.4.0-alpha.12

  error: could not compile `shader`
  Error: BuildFailed

System Info

  • Rust: rustc 1.62.0-nightly (1f7fb6413 2022-04-10)
  • OS: Windows 11
  • GPU: RTX 2080ti
  • SPIR-V: SPIRV-Tools v2022.2-dev v2022.1-4-g20b122b2

Backtrace

Backtrace

<backtrace>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with cargo clippy in the linked rasterization-example project using the reported Rust and rust-gpu revisions. Start at crates/rustc_codegen_spirv/src/codegen_cx/mod.rs:564, where the panic is reported, and trace the nested build path from spirv-builder. Done means the example completes cargo clippy without the compiler panic.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers, computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.