Skip to content

feat: Protobuf 生成の単一エントリ化と Elixir/Rust の生成コード運用#280

Merged
FRICK-ELDY merged 6 commits into
mainfrom
feat/protobuf-gen-proto-automation
Mar 27, 2026
Merged

feat: Protobuf 生成の単一エントリ化と Elixir/Rust の生成コード運用#280
FRICK-ELDY merged 6 commits into
mainfrom
feat/protobuf-gen-proto-automation

Conversation

@FRICK-ELDY

Copy link
Copy Markdown
Owner

proto/*.proto を単一の真実として、Elixir(protoc-gen-elixir)と Rust(prost-build)の
生成・ビルド手順を mix alchemy.gen.proto に集約した。
Elixir 側は手書き protobuf モジュールを廃止し、apps/network/lib/network/proto/generated/
へ生成物を配置。network / nif クレートは prost で型生成し、Zenoh・UDP・NIF の
シリアライズ経路を生成型ベースに統一した。
CI では protoc・protoc-gen-elixir を用意し、mix alchemy.gen.proto 実行後に
生成ディレクトリの git diff で鮮度を検証。手順書は workspace/7_done へ移動。
レビュー対応: cargo build で network と nif の両方をビルド、失敗時は Mix.raise で
一時ディレクトリを after で確実に削除、Rust build.rs は proto ディレクトリを列挙、
デコードフォールバック時は debug ログ、E2E ゴールデン手順の注記を更新。

@FRICK-ELDY FRICK-ELDY self-assigned this Mar 27, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request completes the transition from MessagePack and Erlang Term Format (ETF) to Protocol Buffers for all network communication and frame injection. It introduces a new automated protobuf generation task, updates the UDP protocol to support compressed protobuf payloads, and removes legacy serialization dependencies. Rust components were refactored to use generated types. Review feedback recommends increasing the logging severity for NIF call failures to ensure better visibility of potential issues.

I am having trouble creating individual review comments. Click here to see my feedback.

apps/contents/lib/events/game.ex (804)

medium

NIF呼び出しの失敗はゲームプレイに影響を与える可能性があるため、Logger.debug ではなく Logger.warn または Logger.error を使用して、より目立つようにログを記録することを検討してください。これにより、問題発生時に迅速な検出と対応が可能になります。

        Logger.warn("[Events.Game] set_player_input failed: #{inspect(reason)}")

apps/contents/lib/events/game.ex (846)

medium

NIF呼び出しの失敗はゲームプレイに影響を与える可能性があるため、Logger.debug ではなく Logger.warn または Logger.error を使用して、より目立つようにログを記録することを検討してください。これにより、問題発生時に迅速な検出と対応が可能になります。

        Logger.warn("[Events.Game] set_weapon_slots failed: #{inspect(reason)}")

@FRICK-ELDY
FRICK-ELDY merged commit 94cc1e2 into main Mar 27, 2026
0 of 2 checks passed
@FRICK-ELDY
FRICK-ELDY deleted the feat/protobuf-gen-proto-automation branch March 27, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant