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

ci: 🔨 fix v0.10.2 build #2

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,29 @@ jobs:
- run: cargo fmt --all --check

deny-check:
# NOTE(kate): this allows for duplicate dependencies of a single crate.
# Since 0.10.2 was released, releases have drifted and `prost-build` and
# `strum-macros` depend on different versions of `heck`.
#
# rather than changing v0.10.2, we pass `--allow duplicate` for now, until
# we upgrade to tonic@0.11.
#
# ```
# error[duplicate]: found 2 duplicate entries for crate 'heck'
# ┌─ /home/katie/work/tonic/Cargo.lock:58:1
# │
# 58 │ ╭ heck 0.4.1 registry+https://github.com/rust-lang/crates.io-index
# 59 │ │ heck 0.5.0 registry+https://github.com/rust-lang/crates.io-index
# │ ╰────────────────────────────────────────────────────────────────^ lock entries
# ```
name: cargo-deny check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
command-arguments: "--allow duplicate"

codegen:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -88,7 +106,7 @@ jobs:
- uses: actions/checkout@v3
- uses: hecrj/setup-rust-action@v1
with:
rust-version: "1.64" # msrv
rust-version: "1.70" # msrv
- name: Install protoc
uses: taiki-e/install-action@v2
with:
Expand Down
1 change: 1 addition & 0 deletions tests/integration_tests/tests/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ async fn status_from_server_stream_with_source() {
jh.await.unwrap();
}

#[allow(dead_code)]
struct Unsync(*mut ());

unsafe impl Send for Unsync {}
Expand Down
1 change: 1 addition & 0 deletions tonic-health/src/generated/grpc_health_v1.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HealthCheckRequest {
Expand Down
1 change: 1 addition & 0 deletions tonic-reflection/src/generated/grpc_reflection_v1alpha.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
/// The message sent by the client when calling ServerReflectionInfo method.
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
1 change: 1 addition & 0 deletions tonic-types/src/generated/google_rpc.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// This file is @generated by prost-build.
/// The `Status` type defines a logical error model that is suitable for
/// different programming environments, including REST APIs and RPC APIs. It is
/// used by [gRPC](<https://github.com/grpc>). Each `Status` message contains
Expand Down
1 change: 1 addition & 0 deletions tonic-types/src/richer_error/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ trait IntoAny {
fn into_any(self) -> Any;
}

#[allow(dead_code)]
trait FromAny {
fn from_any(any: Any) -> Result<Self, DecodeError>
where
Expand Down
8 changes: 5 additions & 3 deletions tonic/src/transport/service/connector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use super::io::BoxedIo;
#[cfg(feature = "tls")]
use super::tls::TlsConnector;
use http::Uri;
use std::fmt;
use std::task::{Context, Poll};
use tower::make::MakeConnection;
use tower_service::Service;
Expand Down Expand Up @@ -104,14 +103,17 @@ where
}

/// Error returned when trying to connect to an HTTPS endpoint without TLS enabled.
#[cfg(feature = "tls")]
#[derive(Debug)]
pub(crate) struct HttpsUriWithoutTlsSupport(());

impl fmt::Display for HttpsUriWithoutTlsSupport {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
#[cfg(feature = "tls")]
impl std::fmt::Display for HttpsUriWithoutTlsSupport {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "Connecting to HTTPS without TLS enabled")
}
}

// std::error::Error only requires a type to impl Debug and Display
#[cfg(feature = "tls")]
impl std::error::Error for HttpsUriWithoutTlsSupport {}
Loading