Skip to content

Commit

Permalink
tonic-health: commit generated code (#1065)
Browse files Browse the repository at this point in the history
* tonic-health: commit generated code rather than generating at build time

This saves users from needing protoc available on their path if they're not
generating other tonic code at build time, either.

The generated modules can be regenerated by enabling the `gen-proto`
feature, which will trigger the relevant part of the build script.

* Check generated code for tonic-health matches in CI

* Use bootstrap test to generate/check validity of generated code

As suggested by @LucioFranco in https://github.com/hyperium/tonic/pull/1065\#discussion_r951580189.
This avoids the need for a feature which would show
up in docs.rs, and achieves the same goals via CI.
  • Loading branch information
sd2k authored Aug 23, 2022
1 parent 2d66a0a commit 0a2a2f3
Show file tree
Hide file tree
Showing 6 changed files with 413 additions and 20 deletions.
4 changes: 1 addition & 3 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ version = "0.7.0"

[features]
default = ["transport"]
transport = ["tonic/transport", "tonic-build/transport"]
transport = ["tonic/transport"]

[dependencies]
async-stream = "0.3"
Expand All @@ -28,6 +28,4 @@ tonic = {version = "0.8", path = "../tonic", features = ["codegen", "prost"]}

[dev-dependencies]
tokio = {version = "1.0", features = ["rt-multi-thread", "macros"]}

[build-dependencies]
tonic-build = {version = "0.8", path = "../tonic-build", features = ["prost"]}
14 changes: 0 additions & 14 deletions tonic-health/build.rs

This file was deleted.

Loading

0 comments on commit 0a2a2f3

Please sign in to comment.