Rust codegen: generateEmptySourcesIfNeeded omits empty Rust outputs when nativeLanguage == .rust
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 86/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- build-system
調査の方向性
compiler/compiler/Compiler/Sources/Processors/CombineNativeSourcesProcessor.swiftから始めて、generateEmptySourcesIfNeededを読み、既存のmakeEmptySource呼び出しとhasRustチェックをたどってください。.rs、_ffi.h、_rust_link_apple.params、_rust_link_elf.paramsについて、issueで説明されているRustの空出力分岐を追加してください。Rustモジュールにエクスポートされたネイティブ宣言がない場合に、宣言された4つすべてのBazel出力が生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Found while reviewing https://github.com/Snapchat/Valdi/pull/211 (native Rust code generation). Not blocking that PR.
generateEmptySourcesIfNeeded omits empty Rust outputs when nativeLanguage == .rust
File: compiler/compiler/Compiler/Sources/Processors/CombineNativeSourcesProcessor.swift
When a valdi_module sets native_language = "rust" and defines no @ExportModel, @ExportEnum, @ExportModule, @ExportFunction, or @ExportProxy declarations, Bazel fails the build with missing declared outputs. CombineNativeSourcesProcessor.generateEmptySourcesIfNeeded now restricts its empty C++ fallback to bundle.nativeLanguage == .cpp and does not emit empty Rust outputs.
Because valdi_compiled.bzl unconditionally declares <name>.rs, <name>_ffi.h, <name>_rust_link_apple.params, and <name>_rust_link_elf.params whenever emit_release is true and passes --only-generate-native-code-for-module, any Rust-enabled module without exported native symbols produces none of those four files.
Add an else if bundle.cppCodegenEnabled && bundle.nativeLanguage == .rust && !hasRust branch in generateEmptySourcesIfNeeded that calls makeEmptySource for .rs, _ffi.h, _rust_link_apple.params, and _rust_link_elf.params.
- 主要言語
- C++
- スター
- 16.4k
- フォーク
- 539
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Snapchat/Valdi のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
Rust codegen: RustMethodResolver fails to unwrap .nullable on optional interface/module methodsオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信
似ている issue
-
RTL-SDR: re-enumerating while streaming removes the in-use entry from the device selection dialog対応中かも @dpc00 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
throneproj/Throne#2227 ·
メンテナーはふだん 3 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
deepseek-ai/DeepGEMM-Ascend#49 ·
メンテナーはふだん 1 日以内に返信