Skip to content
New issue

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

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

Already on GitHub? # to your account

refactor: move all proto files to a standalone module #3078

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

Conversation

imotai
Copy link

@imotai imotai commented Nov 1, 2024

Based on the requirements outlined in issue #3073, I believe moving all proto files to a standalone module would provide a better experience for library users.
By the way. I am one of the users.

Copy link
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

👍 Creating a new package makes sense.

However, I think instead of using a build.rs script, the ticket asks us to check in the generated files. So I think the acceptance criteria here are:

  1. No build.rs should need protoc. All the protoc files should be generated manually when the files are changed.
    • As part of this, we should be able to remove all CI job lines that require protoc. For example:
      sudo apt install -y protobuf-compiler libssl-dev
  2. There needs to be a CI job to validate that the generated protobuf definitions are in sync with the .proto files. One possibility is running the protobuf build script and then using git to see if there are any changes.

@imotai
Copy link
Author

imotai commented Nov 2, 2024

  1. Done
  2. I believe we still need build.rs to regenerate the code file whenever the protobuf file changes

@wjones127
Copy link
Contributor

I believe we still need build.rs to regenerate the code file whenever the protobuf file changes

I think as long as there is a build.rs, it will mean there is a build time dependency on protoc.

Here is a good inspiration from another project that demonstrates putting generating the protobuf artifacts in a separate script: apache/arrow-rs#3927

Copy link
Contributor

Choose a reason for hiding this comment

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

You might have to add some lines to allow certain lints in generated files:

#[allow(clippy::___)]

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants