[Migrated] We should replace `rustc_codegen_spirv::linker::test` unit tests with compiletest ones.
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Rust
- Star
- 3.4k
- Fork
- 126
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu với crates/rustc_codegen_spirv/src/linker/test.rs, đặc biệt là các test xung quanh những dòng được tham chiếu, và xem xét phần hỗ trợ compiletest cùng issue #956. Xác định liệu module_asm!, các dependency của compiletest hay Rust FFI có thể biểu diễn các đầu vào assembly SPIR-V hay không. Hoàn thành khi các test của linker sử dụng compiletest mà không có các compiler session nhân tạo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- compilers, testing-qa
- Loại issue
- Tái cấu trúc
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 30/100