Skip to content

Commit 2463081

Browse files
Update prost to version 0.13 (#651)
Signed-off-by: Ionut Slaveanu <[email protected]>
1 parent b82c902 commit 2463081

File tree

29 files changed

+82
-115
lines changed

29 files changed

+82
-115
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ futures-executor = "0.3"
2323
futures-util = { version = "0.3", default-features = false, features = ["std", "sink"] }
2424
protobuf = { version = "2.0", optional = true }
2525
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
26-
prost = { version = "0.12", optional = true }
26+
prost = { version = "0.13", optional = true }
2727
bytes = { version = "1.0", optional = true }
2828
log = "0.4"
2929
parking_lot = "0.12"

compiler/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ prost-codec = ["prost-build", "prost-types", "prost", "derive-new", "tempfile"]
1818

1919
[dependencies]
2020
protobuf = { version = "2", optional = true }
21-
prost = { version = "0.12", optional = true }
22-
prost-build = { version = "0.12", optional = true }
23-
prost-types = { version = "0.12", optional = true }
21+
prost = { version = "0.13", optional = true }
22+
prost-build = { version = "0.13", optional = true }
23+
prost-types = { version = "0.13", optional = true }
2424
derive-new = { version = "0.6", optional = true }
2525
tempfile = { version = "3.0", optional = true }
2626

compiler/src/codegen.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ impl<'a> ServiceGen<'a> {
574574

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

584584
w.write_line("");
585585

586-
w.impl_self_block(&self.client_name(), |w| {
586+
w.impl_self_block(self.client_name(), |w| {
587587
w.pub_fn("new(channel: ::grpcio::Channel) -> Self", |w| {
588588
w.expr_block(&self.client_name(), |w| {
589589
w.field_entry("client", "::grpcio::Client::new(channel)");

grpc-sys/bindings/bindings.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -704,16 +704,6 @@ pub struct grpc_server {
704704
pub struct grpc_call {
705705
_unused: [u8; 0],
706706
}
707-
#[repr(C)]
708-
#[derive(Debug, Copy, Clone)]
709-
pub struct grpc_socket_mutator {
710-
_unused: [u8; 0],
711-
}
712-
#[repr(C)]
713-
#[derive(Debug, Copy, Clone)]
714-
pub struct grpc_socket_factory {
715-
_unused: [u8; 0],
716-
}
717707
#[repr(u32)]
718708
#[doc = " Type specifier for grpc_arg"]
719709
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]

grpc-sys/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,7 @@ fn bindgen_grpc(file_path: &Path) {
464464
.blocklist_type(r"gpr_mu")
465465
.blocklist_type(r"gpr_cv")
466466
.blocklist_type(r"gpr_once")
467+
.blocklist_type(r"grpc_socket_.*")
467468
.constified_enum_module(r"grpc_status_code")
468469
.layout_tests(gen_tests)
469470
.default_enum_style(bindgen::EnumVariation::Rust {

health/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ prost-codec = ["grpcio/prost-codec", "prost"]
2222
futures-executor = "0.3"
2323
futures-util = { version = "0.3", default-features = false, features = ["std"] }
2424
grpcio = { path = "..", version = "0.13.0", default-features = false }
25-
prost = { version = "0.12", optional = true }
25+
prost = { version = "0.13", optional = true }
2626
protobuf = { version = "2", optional = true }
2727
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
2828
log = "0.4"

health/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
//! assert_eq!(statuss_resp.status, ServingStatus::Serving);
3232
//! ```
3333
34+
#[allow(renamed_and_removed_lints)]
3435
pub mod proto;
3536
mod service;
3637

health/src/proto/prost/grpc.health.v1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub struct HealthCheckRequest {
66
pub service: ::prost::alloc::string::String,
77
}
88
#[allow(clippy::derive_partial_eq_without_eq)]
9-
#[derive(Clone, PartialEq, ::prost::Message)]
9+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1010
pub struct HealthCheckResponse {
1111
#[prost(enumeration = "health_check_response::ServingStatus", tag = "1")]
1212
pub status: i32,

health/src/proto/protobuf_v3/health.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by rust-protobuf 3.4.0. Do not edit
1+
// This file is generated by rust-protobuf 3.5.0. Do not edit
22
// @generated
33

44
// https://github.com/rust-lang/rust-clippy/issues/702
@@ -22,7 +22,7 @@
2222
2323
/// Generated files are compatible only with the same version
2424
/// of protobuf runtime.
25-
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
25+
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;
2626

2727
// @@protoc_insertion_point(message:grpc.health.v1.HealthCheckRequest)
2828
#[derive(PartialEq,Clone,Default,Debug)]

interop/tests/tests.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@ macro_rules! mk_test {
5353
mk_test!(empty_unary);
5454
mk_test!(large_unary);
5555
// FIXME(#305) Intermittent test.
56-
#[cfg(not(feature = "openssl"))]
5756
mk_test!(client_streaming);
5857
mk_test!(server_streaming);
5958
// FIXME(#306) Intermittent test.
60-
#[cfg(not(feature = "openssl"))]
6159
mk_test!(ping_pong);
6260
mk_test!(custom_metadata);
6361
mk_test!(empty_stream);

proto/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ prost-codec = ["prost-build", "prost-derive", "prost-types", "bytes", "lazy_stat
2020
[dependencies]
2121
grpcio = { path = "..", features = ["boringssl"], version = "0.13.0", default-features = false }
2222
bytes = { version = "1.0", optional = true }
23-
prost = { version = "0.12", optional = true }
24-
prost-derive = { version = "0.12", optional = true }
25-
prost-types = { version = "0.12", optional = true }
23+
prost = { version = "0.13", optional = true }
24+
prost-derive = { version = "0.13", optional = true }
25+
prost-types = { version = "0.13", optional = true }
2626
protobuf = { version = "2", optional = true }
2727
protobufv3 = { package = "protobuf", version = "3.2", optional = true }
2828
lazy_static = { version = "1.3", optional = true }
2929

3030
[build-dependencies]
31-
prost-build = { version = "0.12", optional = true }
31+
prost-build = { version = "0.13", optional = true }
3232
walkdir = "2.2"

proto/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Copyright 2019 TiKV Project Authors. Licensed under Apache-2.0.
22

3+
#[allow(renamed_and_removed_lints)]
34
mod proto;
45

56
#[cfg(any(feature = "protobuf-codec", feature = "protobufv3-codec"))]

proto/src/proto/prost/example/routeguide.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
/// Latitudes should be in the range +/- 90 degrees and longitude should be in
55
/// the range +/- 180 degrees (inclusive).
66
#[allow(clippy::derive_partial_eq_without_eq)]
7-
#[derive(Clone, PartialEq, ::prost::Message)]
7+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
88
pub struct Point {
99
#[prost(int32, tag = "1")]
1010
pub latitude: i32,
@@ -14,7 +14,7 @@ pub struct Point {
1414
/// A latitude-longitude rectangle, represented as two diagonally opposite
1515
/// points "lo" and "hi".
1616
#[allow(clippy::derive_partial_eq_without_eq)]
17-
#[derive(Clone, PartialEq, ::prost::Message)]
17+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1818
pub struct Rectangle {
1919
/// One corner of the rectangle.
2020
#[prost(message, optional, tag = "1")]
@@ -53,7 +53,7 @@ pub struct RouteNote {
5353
/// detected features, and the total distance covered as the cumulative sum of
5454
/// the distance between each point.
5555
#[allow(clippy::derive_partial_eq_without_eq)]
56-
#[derive(Clone, PartialEq, ::prost::Message)]
56+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
5757
pub struct RouteSummary {
5858
/// The number of points received.
5959
#[prost(int32, tag = "1")]

proto/src/proto/prost/testing/grpc.testing.rs

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
// This file is @generated by prost-build.
22
#[allow(clippy::derive_partial_eq_without_eq)]
3-
#[derive(Clone, PartialEq, ::prost::Message)]
3+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
44
pub struct ByteBufferParams {
55
#[prost(int32, tag = "1")]
66
pub req_size: i32,
77
#[prost(int32, tag = "2")]
88
pub resp_size: i32,
99
}
1010
#[allow(clippy::derive_partial_eq_without_eq)]
11-
#[derive(Clone, PartialEq, ::prost::Message)]
11+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
1212
pub struct SimpleProtoParams {
1313
#[prost(int32, tag = "1")]
1414
pub req_size: i32,
@@ -18,18 +18,18 @@ pub struct SimpleProtoParams {
1818
/// TODO (vpai): Fill this in once the details of complex, representative
1919
/// protos are decided
2020
#[allow(clippy::derive_partial_eq_without_eq)]
21-
#[derive(Clone, PartialEq, ::prost::Message)]
21+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2222
pub struct ComplexProtoParams {}
2323
#[allow(clippy::derive_partial_eq_without_eq)]
24-
#[derive(Clone, PartialEq, ::prost::Message)]
24+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
2525
pub struct PayloadConfig {
2626
#[prost(oneof = "payload_config::Payload", tags = "1, 2, 3")]
2727
pub payload: ::core::option::Option<payload_config::Payload>,
2828
}
2929
/// Nested message and enum types in `PayloadConfig`.
3030
pub mod payload_config {
3131
#[allow(clippy::derive_partial_eq_without_eq)]
32-
#[derive(Clone, PartialEq, ::prost::Oneof)]
32+
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
3333
pub enum Payload {
3434
#[prost(message, tag = "1")]
3535
BytebufParams(super::ByteBufferParams),
@@ -40,7 +40,7 @@ pub mod payload_config {
4040
}
4141
}
4242
#[allow(clippy::derive_partial_eq_without_eq)]
43-
#[derive(Clone, PartialEq, ::prost::Message)]
43+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
4444
pub struct ServerStats {
4545
/// wall clock time change in seconds since last reset
4646
#[prost(double, tag = "1")]
@@ -64,7 +64,7 @@ pub struct ServerStats {
6464
}
6565
/// Histogram params based on grpc/support/histogram.c
6666
#[allow(clippy::derive_partial_eq_without_eq)]
67-
#[derive(Clone, PartialEq, ::prost::Message)]
67+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
6868
pub struct HistogramParams {
6969
/// first bucket is [0, 1 + resolution)
7070
#[prost(double, tag = "1")]
@@ -91,7 +91,7 @@ pub struct HistogramData {
9191
pub count: f64,
9292
}
9393
#[allow(clippy::derive_partial_eq_without_eq)]
94-
#[derive(Clone, PartialEq, ::prost::Message)]
94+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
9595
pub struct RequestResultCount {
9696
#[prost(int32, tag = "1")]
9797
pub status_code: i32,
@@ -121,7 +121,7 @@ pub struct ClientStats {
121121
/// Parameters of poisson process distribution, which is a good representation
122122
/// of activity coming in from independent identical stationary sources.
123123
#[allow(clippy::derive_partial_eq_without_eq)]
124-
#[derive(Clone, PartialEq, ::prost::Message)]
124+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
125125
pub struct PoissonParams {
126126
/// The rate of arrivals (a.k.a. lambda parameter of the exp distribution).
127127
#[prost(double, tag = "1")]
@@ -130,18 +130,18 @@ pub struct PoissonParams {
130130
/// Once an RPC finishes, immediately start a new one.
131131
/// No configuration parameters needed.
132132
#[allow(clippy::derive_partial_eq_without_eq)]
133-
#[derive(Clone, PartialEq, ::prost::Message)]
133+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
134134
pub struct ClosedLoopParams {}
135135
#[allow(clippy::derive_partial_eq_without_eq)]
136-
#[derive(Clone, PartialEq, ::prost::Message)]
136+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
137137
pub struct LoadParams {
138138
#[prost(oneof = "load_params::Load", tags = "1, 2")]
139139
pub load: ::core::option::Option<load_params::Load>,
140140
}
141141
/// Nested message and enum types in `LoadParams`.
142142
pub mod load_params {
143143
#[allow(clippy::derive_partial_eq_without_eq)]
144-
#[derive(Clone, PartialEq, ::prost::Oneof)]
144+
#[derive(Clone, Copy, PartialEq, ::prost::Oneof)]
145145
pub enum Load {
146146
#[prost(message, tag = "1")]
147147
ClosedLoop(super::ClosedLoopParams),
@@ -234,7 +234,7 @@ pub struct ClientStatus {
234234
}
235235
/// Request current stats
236236
#[allow(clippy::derive_partial_eq_without_eq)]
237-
#[derive(Clone, PartialEq, ::prost::Message)]
237+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
238238
pub struct Mark {
239239
/// if true, the stats will be reset after taking their snapshot.
240240
#[prost(bool, tag = "1")]
@@ -312,7 +312,7 @@ pub mod server_args {
312312
}
313313
}
314314
#[allow(clippy::derive_partial_eq_without_eq)]
315-
#[derive(Clone, PartialEq, ::prost::Message)]
315+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
316316
pub struct ServerStatus {
317317
#[prost(message, optional, tag = "1")]
318318
pub stats: ::core::option::Option<ServerStats>,
@@ -324,17 +324,17 @@ pub struct ServerStatus {
324324
pub cores: i32,
325325
}
326326
#[allow(clippy::derive_partial_eq_without_eq)]
327-
#[derive(Clone, PartialEq, ::prost::Message)]
327+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
328328
pub struct CoreRequest {}
329329
#[allow(clippy::derive_partial_eq_without_eq)]
330-
#[derive(Clone, PartialEq, ::prost::Message)]
330+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
331331
pub struct CoreResponse {
332332
/// Number of cores available on the server
333333
#[prost(int32, tag = "1")]
334334
pub cores: i32,
335335
}
336336
#[allow(clippy::derive_partial_eq_without_eq)]
337-
#[derive(Clone, PartialEq, ::prost::Message)]
337+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
338338
pub struct Void {}
339339
/// A single performance scenario: input to qps_json_driver
340340
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -375,7 +375,7 @@ pub struct Scenarios {
375375
/// Basic summary that can be computed from ClientStats and ServerStats
376376
/// once the scenario has finished.
377377
#[allow(clippy::derive_partial_eq_without_eq)]
378-
#[derive(Clone, PartialEq, ::prost::Message)]
378+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
379379
pub struct ScenarioResultSummary {
380380
/// Total number of operations per second over all clients.
381381
#[prost(double, tag = "1")]
@@ -565,13 +565,13 @@ impl RpcType {
565565
/// };
566566
///
567567
#[allow(clippy::derive_partial_eq_without_eq)]
568-
#[derive(Clone, PartialEq, ::prost::Message)]
568+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
569569
pub struct Empty {}
570570
/// TODO(dgq): Go back to using well-known types once
571571
/// <https://github.com/grpc/grpc/issues/6980> has been fixed.
572572
/// import "google/protobuf/wrappers.proto";
573573
#[allow(clippy::derive_partial_eq_without_eq)]
574-
#[derive(Clone, PartialEq, ::prost::Message)]
574+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
575575
pub struct BoolValue {
576576
/// The bool value.
577577
#[prost(bool, tag = "1")]
@@ -664,15 +664,15 @@ pub struct StreamingInputCallRequest {
664664
}
665665
/// Client-streaming response.
666666
#[allow(clippy::derive_partial_eq_without_eq)]
667-
#[derive(Clone, PartialEq, ::prost::Message)]
667+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
668668
pub struct StreamingInputCallResponse {
669669
/// Aggregated size of payloads received from the client.
670670
#[prost(int32, tag = "1")]
671671
pub aggregated_payload_size: i32,
672672
}
673673
/// Configuration for a particular response.
674674
#[allow(clippy::derive_partial_eq_without_eq)]
675-
#[derive(Clone, PartialEq, ::prost::Message)]
675+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
676676
pub struct ResponseParameters {
677677
/// Desired payload sizes in responses from the server.
678678
#[prost(int32, tag = "1")]
@@ -720,7 +720,7 @@ pub struct StreamingOutputCallResponse {
720720
/// For reconnect interop test only.
721721
/// Client tells server what reconnection parameters it used.
722722
#[allow(clippy::derive_partial_eq_without_eq)]
723-
#[derive(Clone, PartialEq, ::prost::Message)]
723+
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
724724
pub struct ReconnectParams {
725725
#[prost(int32, tag = "1")]
726726
pub max_reconnect_backoff_ms: i32,

proto/src/proto/protobuf_v3/example/helloworld.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by rust-protobuf 3.4.0. Do not edit
1+
// This file is generated by rust-protobuf 3.5.0. Do not edit
22
// @generated
33

44
// https://github.com/rust-lang/rust-clippy/issues/702
@@ -22,7 +22,7 @@
2222
2323
/// Generated files are compatible only with the same version
2424
/// of protobuf runtime.
25-
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
25+
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;
2626

2727
// @@protoc_insertion_point(message:helloworld.HelloRequest)
2828
#[derive(PartialEq,Clone,Default,Debug)]

proto/src/proto/protobuf_v3/example/route_guide.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is generated by rust-protobuf 3.4.0. Do not edit
1+
// This file is generated by rust-protobuf 3.5.0. Do not edit
22
// @generated
33

44
// https://github.com/rust-lang/rust-clippy/issues/702
@@ -22,7 +22,7 @@
2222
2323
/// Generated files are compatible only with the same version
2424
/// of protobuf runtime.
25-
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_4_0;
25+
const _PROTOBUF_VERSION_CHECK: () = ::protobufv3::VERSION_3_5_0;
2626

2727
// @@protoc_insertion_point(message:routeguide.Point)
2828
#[derive(PartialEq,Clone,Default,Debug)]

0 commit comments

Comments
 (0)