Rust codegen: @snap_client_toolchains//:compilation_mode_opt is missing in internal monorepo builds, breaking valdi_core_rust_cc analysis
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 77/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
- build-system
Hướng nghiên cứu
Bắt đầu tại valdi_core/BUILD.bazel, ở select defines của valdi_core_rust_cc, sau đó so sánh các mẫu @snap_client_toolchains trong client/bzl/toolchains/BUILD.sc_build_flags.tpl và BUILD.flags.tpl với stub độc lập bzl/toolchains/BUILD.bazel. Cung cấp thiết lập cấu hình này trong các bản build nội bộ và xác nhận rằng phân tích Bazel thành công ở đó cho //valdi_core:valdi_core_rust_cc.
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.
@snap_client_toolchains//:compilation_mode_opt is missing in internal monorepo builds, breaking valdi_core_rust_cc analysis
File: valdi_core/BUILD.bazel
Configuring //valdi_core:valdi_core_rust_cc (or any target that depends on it, such as //valdi:test_integration or a valdi_module with native_language = "rust") in an internal monorepo workspace (client, android, phantom, banshee) fails Bazel analysis because @snap_client_toolchains//:compilation_mode_opt does not exist there. The defines select(...) on valdi_core_rust_cc references @snap_client_toolchains//:compilation_mode_opt.
Internal builds generate @snap_client_toolchains via setup_snap_cxx_toolchains in client/bzl/toolchains/setup.bzl using templates such as client/bzl/toolchains/BUILD.sc_build_flags.tpl and client/bzl/toolchains/BUILD.flags.tpl, none of which declare :compilation_mode_opt (it only exists in the standalone stub bzl/toolchains/BUILD.bazel). Because Bazel evaluates select keys during analysis in every workspace, referencing a label absent from the generated repo breaks target analysis on internal builds.
Define a local config_setting(name = "compilation_mode_opt", values = {"compilation_mode": "opt"}) in valdi_core/BUILD.bazel and select on ":compilation_mode_opt" (or use @snap_client_toolchains//:sc_build_flag_assert, which both toolchains define).
- 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