Rust codegen: Gating emit_rust on emit_release breaks Rust native_deps and valdi_test under code_coverage and output_flavor=debug
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- backend, build-system
Hướng nghiên cứu
Start in bzl/valdi/valdi_compiled.bzl and trace how emit_release controls emit_rust and outputs for debug and code_coverage builds. Then read bzl/valdi/extract_rust_outputs.bzl and bzl/valdi/valdi_test.bzl to follow the generated Rust sources into native_deps. Done means Rust bindings are generated and native_deps and valdi_test compile with both configurations.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while reviewing https://github.com/Snapchat/Valdi/pull/211 (native Rust code generation). Not blocking that PR.
Gating emit_rust on emit_release breaks Rust native_deps and valdi_test under code_coverage and output_flavor=debug
File: bzl/valdi/valdi_compiled.bzl
When building a native_language = "rust" module (or running its valdi_test target) with @valdi//bzl/valdi:code_coverage_enabled=true or @valdi//bzl/valdi:output_flavor=debug, Rust compilation of native_deps fails because the generated _rust crate is empty. In valdi_compiled.bzl, emit_rust is gated on emit_release, which is False under code_coverage or output_flavor == "debug".
When emit_rust is False, ValdiModuleInfo.rust_srcs is None, so bzl/valdi/extract_rust_outputs.bzl writes an empty .rs file for <name>_rust_srcs. Any rust_library in native_deps then fails to compile due to missing generated traits, models, and registration macros — including during valdi_test, because bzl/valdi/valdi_test.bzl now builds a test_binary linked against <target>_native -> <target>_cpp -> native_deps.
Either keep generating the shared Rust bindings regardless of output_flavor / code_coverage (the compiler only suppresses release platform outputs when --output-target debug is passed), or avoid gating emit_rust / outputs on emit_release when native targets depend on them.
- Ngôn ngữ chính
- C++
- Star
- 16.4k
- Fork
- 539
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc 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.
Issue khác của Snapchat/Valdi
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Rust codegen: RustMethodResolver fails to unwrap .nullable on optional interface/module methodsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Snapchat/Valdi
Issue tương tự
-
RTL-SDR: re-enumerating while streaming removes the in-use entry from the device selection dialogCó thể đã có người làm @dpc00 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
throneproj/Throne#2227 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
deepseek-ai/DeepGEMM-Ascend#49 ·
Maintainer thường phản hồi trong vòng 1 ngày