From caa9495f011c1bef2aa814c6d8995d6d54a5ae07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:43:02 +0200 Subject: [PATCH] Upgrade `actix-ws` crate from 0.2 to 0.3 version (#1267) - bump up MSRV to 1.75 in `juniper_actix` crate Additionally: - remove redundant `InterruptableStream` definitions in `juniper_graphql_ws` crate Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kai Ren --- .github/workflows/ci.yml | 10 +++++----- juniper_actix/CHANGELOG.md | 15 ++++++++++++++- juniper_actix/Cargo.toml | 4 ++-- .../src/graphql_transport_ws/mod.rs | 17 ----------------- juniper_graphql_ws/src/graphql_ws/mod.rs | 17 ----------------- 5 files changed, 21 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac21383b..c602cee2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -150,7 +150,7 @@ jobs: - juniper - juniper_subscriptions - juniper_graphql_ws - - juniper_actix + #- juniper_actix - juniper_axum - juniper_hyper - juniper_rocket @@ -159,6 +159,10 @@ jobs: - ubuntu - macOS - windows + include: + - { msrv: "1.75.0", crate: "juniper_actix", os: "ubuntu" } + - { msrv: "1.75.0", crate: "juniper_actix", os: "macOS" } + - { msrv: "1.75.0", crate: "juniper_actix", os: "windows" } runs-on: ${{ matrix.os }}-latest steps: - uses: actions/checkout@v4 @@ -172,10 +176,6 @@ jobs: - run: cargo +nightly update -Z minimal-versions - run: make test.cargo crate=${{ matrix.crate }} - if: ${{ matrix.crate != 'juniper_actix' }} - # TODO: Remove once MSRV bumps up >=1.75. - - run: cargo check -p ${{ matrix.crate }} --all-features - if: ${{ matrix.crate == 'juniper_actix' }} package: name: check (package) diff --git a/juniper_actix/CHANGELOG.md b/juniper_actix/CHANGELOG.md index a8f65c84..f19890ac 100644 --- a/juniper_actix/CHANGELOG.md +++ b/juniper_actix/CHANGELOG.md @@ -6,6 +6,18 @@ All user visible changes to `juniper_actix` crate will be documented in this fil +## master + +### BC Breaks + +- Switched to 0.3 version of [`actix-ws` crate]. ([#1267]) +- Bumped up [MSRV] to 1.75 due to [`actix-ws` crate] requirements. ([#1267]) + +[#1267]: /../../pull/1267 + + + + ## [0.5.0] ยท 2024-03-20 [0.5.0]: /../../tree/juniper_actix-v0.5.0/juniper_actix @@ -49,4 +61,5 @@ See [old CHANGELOG](/../../blob/juniper_actix-v0.4.0/juniper_actix/CHANGELOG.md) [`juniper_graphql_ws` crate]: https://docs.rs/juniper_graphql_ws [Semantic Versioning 2.0.0]: https://semver.org [graphql-transport-ws]: https://github.com/enisdenjo/graphql-ws/blob/v5.14.0/PROTOCOL.md -[graphql-ws]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md \ No newline at end of file +[graphql-ws]: https://github.com/apollographql/subscriptions-transport-ws/blob/v0.11.0/PROTOCOL.md +[MSRV]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-rust-version-field diff --git a/juniper_actix/Cargo.toml b/juniper_actix/Cargo.toml index e45c7d9e..73888ef2 100644 --- a/juniper_actix/Cargo.toml +++ b/juniper_actix/Cargo.toml @@ -2,7 +2,7 @@ name = "juniper_actix" version = "0.5.0" edition = "2021" -rust-version = "1.73" +rust-version = "1.75" description = "`juniper` GraphQL integration with `actix-web`." license = "BSD-2-Clause" authors = [ @@ -27,7 +27,7 @@ subscriptions = ["dep:actix-ws", "dep:juniper_graphql_ws"] [dependencies] actix-http = "3.2" actix-web = "4.4" -actix-ws = { version = "0.2", optional = true } +actix-ws = { version = "0.3", optional = true } anyhow = "1.0.47" futures = "0.3.22" juniper = { version = "0.16", path = "../juniper", default-features = false } diff --git a/juniper_graphql_ws/src/graphql_transport_ws/mod.rs b/juniper_graphql_ws/src/graphql_transport_ws/mod.rs index 8553c189..365f6037 100644 --- a/juniper_graphql_ws/src/graphql_transport_ws/mod.rs +++ b/juniper_graphql_ws/src/graphql_transport_ws/mod.rs @@ -290,23 +290,6 @@ impl> ConnectionState { } } -struct InterruptableStream { - stream: S, - rx: oneshot::Receiver<()>, -} - -impl Stream for InterruptableStream { - type Item = S::Item; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - match Pin::new(&mut self.rx).poll(cx) { - Poll::Ready(_) => return Poll::Ready(None), - Poll::Pending => {} - } - Pin::new(&mut self.stream).poll_next(cx) - } -} - /// SubscriptionStartState is the state for a subscription operation. enum SubscriptionStartState { /// Init is the start before being polled for the first time. diff --git a/juniper_graphql_ws/src/graphql_ws/mod.rs b/juniper_graphql_ws/src/graphql_ws/mod.rs index 87950717..fcc30afe 100644 --- a/juniper_graphql_ws/src/graphql_ws/mod.rs +++ b/juniper_graphql_ws/src/graphql_ws/mod.rs @@ -260,23 +260,6 @@ impl> ConnectionState { } } -struct InterruptableStream { - stream: S, - rx: oneshot::Receiver<()>, -} - -impl Stream for InterruptableStream { - type Item = S::Item; - - fn poll_next(mut self: Pin<&mut Self>, cx: &mut Context) -> Poll> { - match Pin::new(&mut self.rx).poll(cx) { - Poll::Ready(_) => return Poll::Ready(None), - Poll::Pending => {} - } - Pin::new(&mut self.stream).poll_next(cx) - } -} - /// SubscriptionStartState is the state for a subscription operation. enum SubscriptionStartState { /// Init is the start before being polled for the first time.