Rust-GPU / Rust-GPU/rust-gpu

[Migrated] We should replace `rustc_codegen_spirv::linker::test` unit tests with compiletest ones.

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

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

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

説明

Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/957
Old labels: t: enhancement,a: test
Originally creatd by eddyb on 2022-11-30T16:58:43Z


The main unique aspect of these tests is they take SPIR-V assembly as an input, not Rust code, e.g.:
https://github.com/EmbarkStudios/rust-gpu/blob/acb05d379982f35e6d4fbd85ff28af3e9876cf4c/crates/rustc_codegen_spirv/src/linker/test.rs#L185-L202

However, we might be able to use module_asm! to feed SPIR-V assembly into the compilation, and compiletest does have the ability to introduce dependencies to link against. The main weirdness we might need to deal with is all the definitions from e.g. core that we don't use, but DCE might be able to clean that up.

(Or we could even use e.g. extern "C" FFI in Rust code to describe such situations without module_asm! at all!)

If we can do this transition, we wouldn't have to deal with weird artificial compiler sessions and e.g.:

  • #956

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

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

はじめの一歩

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

調査の方向性

crates/rustc_codegen_spirv/src/linker/test.rs から始め、特に参照されている行の周辺にあるテストを確認し、compiletest のサポートと issue #956 を調査する。module_asm!、compiletest の依存関係、または Rust FFI で SPIR-V アセンブリ入力を表現できるかどうかを判断する。完了条件は、リンカーのテストが人為的なコンパイラーセッションなしで compiletest を使用することである。

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

評価

技術スタック
rust
領域
compilers, testing-qa
issue の種類
リファクタリング
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
30/100

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

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