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

feat: commit generated proto files #753

Merged
merged 2 commits into from
Mar 28, 2023

Conversation

oddgrd
Copy link
Contributor

@oddgrd oddgrd commented Mar 26, 2023

Description of change

This commit uses a test to compile and generate the .proto files, which we then commit, and with the test running in CI we ensure that the generated files are up-to-date if any changes are made to the .proto files. This means the protobuf compiler does not need to be installed to compile shuttle-proto, which also means it won't be required to install the cargo-shuttle CLI.

Protoc will still be required to run/build shuttle projects until we update opentelemetry-otlp to 0.19, which has been released, we just need to wait for tracing-opentelemtry to be updated as well (or do it ourselves). After upgrading these crates protoc will no longer be required for shuttle users, it will only be required to make changes to the .proto files in shuttle-proto.

With this PR we should also be able to remove the protoc install from the binary builds.

Big thanks to @sd2k for suggesting this solution, this PR is largely based on their PR to tonic-health: hyperium/tonic#1065

How Has This Been Tested (if applicable)?

Added a test in shuttle-proto and ran PROTOC="" cargo build -p cargo-shuttle.

Copy link
Contributor

@chesedo chesedo left a comment

Choose a reason for hiding this comment

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

LGTM ❤️

@oddgrd oddgrd merged commit 915a53c into shuttle-hq:main Mar 28, 2023
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.

2 participants