Rust-GPU / Rust-GPU/rust-gpu

[Migrated] Minor Bug: Misleading error message when compile succeeds but no *.spv was found

オープン
#102 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Rust
スター
3.4k
フォーク
126
PR マージ指標
30日以内にマージされた PR はありません

説明

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/955
Old labels: t: enhancement
Originally creatd by Firestar99 on 2022-11-30T14:32:49Z


If you compile a crate with rust-gpu but forget to add

[lib]
crate-type = ["lib", "dylib"]

in it's cargo.toml rust-gpu will error out with: Artifact created when compilation succeeded.
This Error is outright wrong: What actually happened is that compilation succeeded but NO *.spv artifact was found.

The error is thrown in crates/spirv-builder/src/lib.rs line 538, at the end of the invoke_rustc() method.
I'd like to suggest replacing this message with Compilation succeeded but no .spv Artifact was created! Make sure the crate-type includes \"dylib\".

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

crates/spirv-builder/src/lib.rsを開き、invoke_rustc()の末尾にある538行目を確認します。コンパイルが成功した後にアーティファクトなしのケースに至る経緯を確認します。エラーメッセージが .spv アーティファクトが作成されなかったことを正確に説明し、必要な crate-type 設定を示していれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
rust
領域
compilers
issue の種類
バグ
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。