Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enabling proto3_optional flag #1319

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

MukulGarg15
Copy link

@MukulGarg15 MukulGarg15 commented Feb 19, 2025

This PR fixes the Protobuf compilation issue where protoc fails due to proto3 optional fields not being explicitly allowed.
Error message was : Error compiling protobuf files: protoc failed: orchestrator.proto: This file contains proto3 optional fields, but --experimental_allow_proto3_optional was not set.

Changes Made:

  1. Updated the build.rs file to add config.protoc_arg("--experimental_allow_proto3_optional");
  2. Ensured that the correct .proto files are compiled without errors.
  3. Verified that protoc runs successfully and generates the required Rust files.

Why This Fix?

  1. Newer .proto files use optional fields in proto3, which require the --experimental_allow_proto3_optional flag to be set explicitly.
  2. Without this fix, developers cloning the repo and trying to build the project would face errors.

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