[Migrated] We should replace `rustc_codegen_spirv::linker::test` unit tests with compiletest ones.
Nessuno ha ancora preso questa issue.
- Lingua principale
- Rust
- Stelle
- 3.4k
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia da crates/rustc_codegen_spirv/src/linker/test.rs, soprattutto dai test intorno alle righe indicate, e passa in rassegna il supporto di compiletest e l’issue #956. Determina se module_asm!, le dipendenze di compiletest o Rust FFI possono rappresentare gli input dell’assembly SPIR-V. Il lavoro è completato quando i test del linker usano compiletest senza le sessioni del compilatore artificiali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- rust
- Ambito
- compilers, testing-qa
- Tipo di issue
- Refactoring
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100