Skip to content

Commit

Permalink
Update prost to version 0.13
Browse files Browse the repository at this point in the history
Signed-off-by: Ionut <[email protected]>
  • Loading branch information
ionut-slaveanu committed Aug 8, 2024
1 parent b82c902 commit b2e6370
Show file tree
Hide file tree
Showing 24 changed files with 79 additions and 103 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ futures-executor = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
protobuf = { version = "2.0", optional = true }
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
prost = { version = "0.12", optional = true }
prost = { version = "0.13", optional = true }
bytes = { version = "1.0", optional = true }
log = "0.4"
parking_lot = "0.12"
Expand Down
6 changes: 3 additions & 3 deletions compiler/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ prost-codec = ["prost-build", "prost-types", "prost", "derive-new", "tempfile"]

[dependencies]
protobuf = { version = "2", optional = true }
prost = { version = "0.12", optional = true }
prost-build = { version = "0.12", optional = true }
prost-types = { version = "0.12", optional = true }
prost = { version = "0.13", optional = true }
prost-build = { version = "0.13", optional = true }
prost-types = { version = "0.13", optional = true }
derive-new = { version = "0.6", optional = true }
tempfile = { version = "3.0", optional = true }

Expand Down
4 changes: 2 additions & 2 deletions compiler/src/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ impl<'a> ServiceGen<'a> {

fn write_client(&self, w: &mut CodeWriter) {
w.write_line("#[derive(Clone)]");
w.pub_struct(&self.client_name(), |w| {
w.pub_struct(self.client_name(), |w| {
// This can also be exposed by a method. But it may introduce a name conflict
// between service definition and method name. Marking it public may put extra
// restrict on compatability, but it should not be an issue.
Expand All @@ -583,7 +583,7 @@ impl<'a> ServiceGen<'a> {

w.write_line("");

w.impl_self_block(&self.client_name(), |w| {
w.impl_self_block(self.client_name(), |w| {
w.pub_fn("new(channel: ::grpcio::Channel) -> Self", |w| {
w.expr_block(&self.client_name(), |w| {
w.field_entry("client", "::grpcio::Client::new(channel)");
Expand Down
2 changes: 1 addition & 1 deletion health/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ prost-codec = ["grpcio/prost-codec", "prost"]
futures-executor = "0.3"
futures-util = { version = "0.3", default-features = false, features = ["std"] }
grpcio = { path = "..", version = "0.13.0", default-features = false }
prost = { version = "0.12", optional = true }
prost = { version = "0.13", optional = true }
protobuf = { version = "2", optional = true }
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
log = "0.4"
2 changes: 1 addition & 1 deletion health/src/proto/prost/grpc.health.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pub struct HealthCheckRequest {
pub service: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HealthCheckResponse {
#[prost(enumeration = "health_check_response::ServingStatus", tag = "1")]
pub status: i32,
Expand Down
4 changes: 2 additions & 2 deletions health/src/proto/protobuf_v3/health.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.4.0. Do not edit
// This file is generated by rust-protobuf 3.5.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
Expand All @@ -22,7 +22,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;

// @@protoc_insertion_point(message:grpc.health.v1.HealthCheckRequest)
#[derive(PartialEq,Clone,Default,Debug)]
Expand Down
8 changes: 4 additions & 4 deletions proto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ prost-codec = ["prost-build", "prost-derive", "prost-types", "bytes", "lazy_stat
[dependencies]
grpcio = { path = "..", features = ["boringssl"], version = "0.13.0", default-features = false }
bytes = { version = "1.0", optional = true }
prost = { version = "0.12", optional = true }
prost-derive = { version = "0.12", optional = true }
prost-types = { version = "0.12", optional = true }
prost = { version = "0.13", optional = true }
prost-derive = { version = "0.13", optional = true }
prost-types = { version = "0.13", optional = true }
protobuf = { version = "2", optional = true }
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
lazy_static = { version = "1.3", optional = true }

[build-dependencies]
prost-build = { version = "0.12", optional = true }
prost-build = { version = "0.13", optional = true }
walkdir = "2.2"
6 changes: 3 additions & 3 deletions proto/src/proto/prost/example/routeguide.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
/// Latitudes should be in the range +/- 90 degrees and longitude should be in
/// the range +/- 180 degrees (inclusive).
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Point {
#[prost(int32, tag = "1")]
pub latitude: i32,
Expand All @@ -14,7 +14,7 @@ pub struct Point {
/// A latitude-longitude rectangle, represented as two diagonally opposite
/// points "lo" and "hi".
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Rectangle {
/// One corner of the rectangle.
#[prost(message, optional, tag = "1")]
Expand Down Expand Up @@ -53,7 +53,7 @@ pub struct RouteNote {
/// detected features, and the total distance covered as the cumulative sum of
/// the distance between each point.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RouteSummary {
/// The number of points received.
#[prost(int32, tag = "1")]
Expand Down
46 changes: 23 additions & 23 deletions proto/src/proto/prost/testing/grpc.testing.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ByteBufferParams {
#[prost(int32, tag = "1")]
pub req_size: i32,
#[prost(int32, tag = "2")]
pub resp_size: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct SimpleProtoParams {
#[prost(int32, tag = "1")]
pub req_size: i32,
Expand All @@ -18,18 +18,18 @@ pub struct SimpleProtoParams {
/// TODO (vpai): Fill this in once the details of complex, representative
/// protos are decided
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ComplexProtoParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PayloadConfig {
#[prost(oneof = "payload_config::Payload", tags = "1, 2, 3")]
pub payload: ::core::option::Option<payload_config::Payload>,
}
/// Nested message and enum types in `PayloadConfig`.
pub mod payload_config {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Payload {
#[prost(message, tag = "1")]
BytebufParams(super::ByteBufferParams),
Expand All @@ -40,7 +40,7 @@ pub mod payload_config {
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ServerStats {
/// wall clock time change in seconds since last reset
#[prost(double, tag = "1")]
Expand All @@ -64,7 +64,7 @@ pub struct ServerStats {
}
/// Histogram params based on grpc/support/histogram.c
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct HistogramParams {
/// first bucket is [0, 1 + resolution)
#[prost(double, tag = "1")]
Expand All @@ -91,7 +91,7 @@ pub struct HistogramData {
pub count: f64,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct RequestResultCount {
#[prost(int32, tag = "1")]
pub status_code: i32,
Expand Down Expand Up @@ -121,7 +121,7 @@ pub struct ClientStats {
/// Parameters of poisson process distribution, which is a good representation
/// of activity coming in from independent identical stationary sources.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct PoissonParams {
/// The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
#[prost(double, tag = "1")]
Expand All @@ -130,18 +130,18 @@ pub struct PoissonParams {
/// Once an RPC finishes, immediately start a new one.
/// No configuration parameters needed.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ClosedLoopParams {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct LoadParams {
#[prost(oneof = "load_params::Load", tags = "1, 2")]
pub load: ::core::option::Option<load_params::Load>,
}
/// Nested message and enum types in `LoadParams`.
pub mod load_params {
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
pub enum Load {
#[prost(message, tag = "1")]
ClosedLoop(super::ClosedLoopParams),
Expand Down Expand Up @@ -234,7 +234,7 @@ pub struct ClientStatus {
}
/// Request current stats
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Mark {
/// if true, the stats will be reset after taking their snapshot.
#[prost(bool, tag = "1")]
Expand Down Expand Up @@ -312,7 +312,7 @@ pub mod server_args {
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ServerStatus {
#[prost(message, optional, tag = "1")]
pub stats: ::core::option::Option<ServerStats>,
Expand All @@ -324,17 +324,17 @@ pub struct ServerStatus {
pub cores: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CoreRequest {}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct CoreResponse {
/// Number of cores available on the server
#[prost(int32, tag = "1")]
pub cores: i32,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Void {}
/// A single performance scenario: input to qps_json_driver
#[allow(clippy::derive_partial_eq_without_eq)]
Expand Down Expand Up @@ -375,7 +375,7 @@ pub struct Scenarios {
/// Basic summary that can be computed from ClientStats and ServerStats
/// once the scenario has finished.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ScenarioResultSummary {
/// Total number of operations per second over all clients.
#[prost(double, tag = "1")]
Expand Down Expand Up @@ -565,13 +565,13 @@ impl RpcType {
/// };
///
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
/// TODO(dgq): Go back to using well-known types once
/// <https://github.com/grpc/grpc/issues/6980> has been fixed.
/// import "google/protobuf/wrappers.proto";
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct BoolValue {
/// The bool value.
#[prost(bool, tag = "1")]
Expand Down Expand Up @@ -664,15 +664,15 @@ pub struct StreamingInputCallRequest {
}
/// Client-streaming response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct StreamingInputCallResponse {
/// Aggregated size of payloads received from the client.
#[prost(int32, tag = "1")]
pub aggregated_payload_size: i32,
}
/// Configuration for a particular response.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ResponseParameters {
/// Desired payload sizes in responses from the server.
#[prost(int32, tag = "1")]
Expand Down Expand Up @@ -720,7 +720,7 @@ pub struct StreamingOutputCallResponse {
/// For reconnect interop test only.
/// Client tells server what reconnection parameters it used.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ReconnectParams {
#[prost(int32, tag = "1")]
pub max_reconnect_backoff_ms: i32,
Expand Down
4 changes: 2 additions & 2 deletions proto/src/proto/protobuf_v3/example/helloworld.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.4.0. Do not edit
// This file is generated by rust-protobuf 3.5.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
Expand All @@ -22,7 +22,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;

// @@protoc_insertion_point(message:helloworld.HelloRequest)
#[derive(PartialEq,Clone,Default,Debug)]
Expand Down
4 changes: 2 additions & 2 deletions proto/src/proto/protobuf_v3/example/route_guide.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.4.0. Do not edit
// This file is generated by rust-protobuf 3.5.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
Expand All @@ -22,7 +22,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;

// @@protoc_insertion_point(message:routeguide.Point)
#[derive(PartialEq,Clone,Default,Debug)]
Expand Down
4 changes: 2 additions & 2 deletions proto/src/proto/protobuf_v3/google/rpc/status.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// This file is generated by rust-protobuf 3.4.0. Do not edit
// This file is generated by rust-protobuf 3.5.0. Do not edit
// @generated

// https://github.com/rust-lang/rust-clippy/issues/702
Expand All @@ -22,7 +22,7 @@

/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;

// @@protoc_insertion_point(message:google.rpc.Status)
#[derive(PartialEq,Clone,Default,Debug)]
Expand Down
Loading

0 comments on commit b2e6370

Please sign in to comment.