Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: hyperium/tonic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.1
Choose a base ref
...
head repository: hyperium/tonic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.2
Choose a head ref
  • 3 commits
  • 16 files changed
  • 3 contributors

Commits on Apr 6, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    9990e6e View commit details

Commits on Apr 14, 2023

  1. tonic-build: support boxing fields (#1252)

    This exposes tokio-rs/prost#802 in Tonic,
    though obviously until that's merged and released this diff does
    nothing.
    
    Co-authored-by: Lucio Franco <luciofranco14@gmail.com>
    krallin and LucioFranco authored Apr 14, 2023

    Verified

    This commit was signed with the committer’s verified signature.
    darinpope Darin Pope
    Copy the full SHA
    65d909e View commit details

Commits on Apr 17, 2023

  1. Copy the full SHA
    ae75801 View commit details
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# [v0.9.2](https://github.com/hyperium/tonic/compare/v0.9.1...v0.9.2) (2023-04-17)

### Features

- **build:**: Support boxing fields ([#1252](https://github.com/hyperium/tonic/pull/1252))


# [v0.9.1](https://github.com/hyperium/tonic/compare/v0.9.0...v0.9.1) (2023-04-03)

### Features
6 changes: 3 additions & 3 deletions tonic-build/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,20 +4,20 @@ categories = ["network-programming", "asynchronous"]
description = """
Codegen module of `tonic` gRPC implementation.
"""
documentation = "https://docs.rs/tonic-build/0.9.1"
documentation = "https://docs.rs/tonic-build/0.9.2"
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "async", "codegen", "protobuf"]
license = "MIT"
name = "tonic-build"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[dependencies]
prettyplease = { version = "0.1" }
proc-macro2 = "1.0"
prost-build = { version = "0.11.6", optional = true }
prost-build = { version = "0.11.9", optional = true }
quote = "1.0"
syn = "1.0"

2 changes: 1 addition & 1 deletion tonic-build/src/lib.rs
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic-build/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
13 changes: 13 additions & 0 deletions tonic-build/src/prost.rs
Original file line number Diff line number Diff line change
@@ -27,6 +27,7 @@ pub fn configure() -> Builder {
message_attributes: Vec::new(),
enum_attributes: Vec::new(),
type_attributes: Vec::new(),
boxed: Vec::new(),
server_attributes: Attributes::default(),
client_attributes: Attributes::default(),
proto_path: "super".to_string(),
@@ -231,6 +232,7 @@ pub struct Builder {
pub(crate) type_attributes: Vec<(String, String)>,
pub(crate) message_attributes: Vec<(String, String)>,
pub(crate) enum_attributes: Vec<(String, String)>,
pub(crate) boxed: Vec<String>,
pub(crate) server_attributes: Attributes,
pub(crate) client_attributes: Attributes,
pub(crate) proto_path: String,
@@ -342,6 +344,14 @@ impl Builder {
self
}

/// Add additional boxed fields.
///
/// Passed directly to `prost_build::Config.boxed`.
pub fn boxed<P: AsRef<str>>(mut self, path: P) -> Self {
self.boxed.push(path.as_ref().to_string());
self
}

/// Add additional attribute to matched server `mod`s. Matches on the package name.
pub fn server_mod_attribute<P: AsRef<str>, A: AsRef<str>>(
mut self,
@@ -492,6 +502,9 @@ impl Builder {
for (prost_path, attr) in self.enum_attributes.iter() {
config.enum_attribute(prost_path, attr);
}
for prost_path in self.boxed.iter() {
config.boxed(prost_path);
}
if self.compile_well_known_types {
config.compile_well_known_types();
}
4 changes: 2 additions & 2 deletions tonic-health/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@ categories = ["network-programming", "asynchronous"]
description = """
Health Checking module of `tonic` gRPC implementation.
"""
documentation = "https://docs.rs/tonic-health/0.9.1"
documentation = "https://docs.rs/tonic-health/0.9.2"
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "async", "healthcheck"]
license = "MIT"
name = "tonic-health"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[features]
default = ["transport"]
2 changes: 1 addition & 1 deletion tonic-health/src/lib.rs
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(html_root_url = "https://docs.rs/tonic-health/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic-health/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
1 change: 1 addition & 0 deletions tonic-health/src/server.rs
Original file line number Diff line number Diff line change
@@ -155,6 +155,7 @@ impl Health for HealthService {
let status = crate::pb::health_check_response::ServingStatus::from(*status_rx.borrow()) as i32;
yield HealthCheckResponse { status };

#[allow(clippy::redundant_pattern_matching)]
while let Ok(_) = status_rx.changed().await {
let status = crate::pb::health_check_response::ServingStatus::from(*status_rx.borrow()) as i32;
yield HealthCheckResponse { status };
4 changes: 2 additions & 2 deletions tonic-reflection/Cargo.toml
Original file line number Diff line number Diff line change
@@ -9,13 +9,13 @@ Server Reflection module of `tonic` gRPC implementation.
"""
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
documentation = "https://docs.rs/tonic-reflection/0.9.1"
documentation = "https://docs.rs/tonic-reflection/0.9.2"
keywords = ["rpc", "grpc", "async", "reflection"]
license = "MIT"
name = "tonic-reflection"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[dependencies]
prost = "0.11"
2 changes: 1 addition & 1 deletion tonic-reflection/src/lib.rs
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
html_logo_url = "https://github.com/hyperium/tonic/raw/master/.github/assets/tonic-docs.png"
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(html_root_url = "https://docs.rs/tonic-reflection/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic-reflection/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
4 changes: 2 additions & 2 deletions tonic-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -7,15 +7,15 @@ categories = ["web-programming", "network-programming", "asynchronous"]
description = """
A collection of useful protobuf types that can be used with `tonic`.
"""
documentation = "https://docs.rs/tonic-types/0.9.1"
documentation = "https://docs.rs/tonic-types/0.9.2"
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "protobuf"]
license = "MIT"
name = "tonic-types"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[dependencies]
prost = "0.11"
2 changes: 1 addition & 1 deletion tonic-types/src/lib.rs
Original file line number Diff line number Diff line change
@@ -150,7 +150,7 @@
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![doc(html_root_url = "https://docs.rs/tonic-types/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic-types/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]

/// Useful protobuf types
4 changes: 2 additions & 2 deletions tonic-web/Cargo.toml
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@ categories = ["network-programming", "asynchronous"]
description = """
grpc-web protocol translation for tonic services.
"""
documentation = "https://docs.rs/tonic-web/0.9.1"
documentation = "https://docs.rs/tonic-web/0.9.2"
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "grpc-web"]
license = "MIT"
name = "tonic-web"
readme = "README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[dependencies]
base64 = "0.21"
2 changes: 1 addition & 1 deletion tonic-web/src/lib.rs
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@
rust_2018_idioms,
unreachable_pub
)]
#![doc(html_root_url = "https://docs.rs/tonic-web/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic-web/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]

pub use layer::GrpcWebLayer;
4 changes: 2 additions & 2 deletions tonic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -13,14 +13,14 @@ categories = ["web-programming", "network-programming", "asynchronous"]
description = """
A gRPC over HTTP/2 implementation focused on high performance, interoperability, and flexibility.
"""
documentation = "https://docs.rs/tonic/0.9.1"
documentation = "https://docs.rs/tonic/0.9.2"
edition = "2021"
homepage = "https://github.com/hyperium/tonic"
keywords = ["rpc", "grpc", "async", "futures", "protobuf"]
license = "MIT"
readme = "../README.md"
repository = "https://github.com/hyperium/tonic"
version = "0.9.1"
version = "0.9.2"

[features]
codegen = ["dep:async-trait"]
2 changes: 1 addition & 1 deletion tonic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -89,7 +89,7 @@
#![doc(
html_logo_url = "https://raw.githubusercontent.com/tokio-rs/website/master/public/img/icons/tonic.svg"
)]
#![doc(html_root_url = "https://docs.rs/tonic/0.9.1")]
#![doc(html_root_url = "https://docs.rs/tonic/0.9.2")]
#![doc(issue_tracker_base_url = "https://github.com/hyperium/tonic/issues/")]
#![doc(test(no_crate_inject, attr(deny(rust_2018_idioms))))]
#![cfg_attr(docsrs, feature(doc_cfg))]
2 changes: 1 addition & 1 deletion tonic/src/status.rs
Original file line number Diff line number Diff line change
@@ -423,7 +423,7 @@ impl Status {
}

if let Some(h2_err) = err.source().and_then(|e| e.downcast_ref::<h2::Error>()) {
let code = Status::code_from_h2(&h2_err);
let code = Status::code_from_h2(h2_err);
let status = Self::new(code, format!("h2 protocol error: {}", err));

return Some(status);