From a31e2112b27ed9b9535e6d0fcf1a4c92aef509fb Mon Sep 17 00:00:00 2001 From: glendc Date: Mon, 22 Jul 2024 13:45:22 +0200 Subject: [PATCH 1/4] use workspace dependencies for tower Closes #776 --- Cargo.toml | 20 +++++++++++++++++ tower-service/Cargo.toml | 6 +++--- tower-test/Cargo.toml | 10 ++++----- tower/Cargo.toml | 46 ++++++++++++++++++++-------------------- 4 files changed, 51 insertions(+), 31 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b7d4757b8..37ab769ef 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,3 +6,23 @@ members = [ "tower-service", "tower-test", ] + +[workspace.dependencies] +futures = "0.3" +futures-core = "0.3" +futures-util = { version = "0.3", default-features = false } +hdrhistogram = { version = "7.0", default-features = false } +http = "0.2" +indexmap = "2.0.2" +lazy_static = "1.4.0" +pin-project-lite = "0.2.7" +quickcheck = "1" +rand = "0.8" +slab = "0.4" +sync_wrapper = "0.1.1" +tokio = "1.6.2" +tokio-stream = "0.1.0" +tokio-test = "0.4" +tokio-util = { version = "0.7.0", default-features = false } +tracing = { version = "0.1.2", default-features = false } +tracing-subscriber = { version = "0.3", default-features = false } diff --git a/tower-service/Cargo.toml b/tower-service/Cargo.toml index 68a5a8768..0e6f5b25a 100644 --- a/tower-service/Cargo.toml +++ b/tower-service/Cargo.toml @@ -22,7 +22,7 @@ edition = "2018" [dependencies] [dev-dependencies] -http = "0.2" +http = { workspace = true } tower-layer = { version = "0.3", path = "../tower-layer" } -tokio = { version = "1", features = ["macros", "time"] } -futures = "0.3" +tokio = { workspace = true, features = ["macros", "time"] } +futures = { workspace = true } diff --git a/tower-test/Cargo.toml b/tower-test/Cargo.toml index 2c01cae21..fad3cd5b4 100644 --- a/tower-test/Cargo.toml +++ b/tower-test/Cargo.toml @@ -20,12 +20,12 @@ categories = ["asynchronous", "network-programming"] edition = "2018" [dependencies] -futures-util = { version = "0.3", default-features = false } -tokio = { version = "1.0", features = ["sync"] } -tokio-test = "0.4" +futures-util = { workspace = true } +tokio = { workspace = true, features = ["sync"] } +tokio-test = { workspace = true } tower-layer = { version = "0.3", path = "../tower-layer" } tower-service = { version = "0.3", path = "../tower-service" } -pin-project-lite = "0.2" +pin-project-lite = { workspace = true } [dev-dependencies] -tokio = { version = "1.0", features = ["macros"] } +tokio = { workspace = true, features = ["macros"] } diff --git a/tower/Cargo.toml b/tower/Cargo.toml index 3e199a844..6c8c0970d 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -68,32 +68,32 @@ util = ["__common", "futures-util", "pin-project-lite", "sync_wrapper"] tower-layer = { version = "0.3.1", path = "../tower-layer" } tower-service = { version = "0.3.1", path = "../tower-service" } -futures-core = { version = "0.3", optional = true } -futures-util = { version = "0.3", default-features = false, features = ["alloc"], optional = true } -hdrhistogram = { version = "7.0", optional = true, default-features = false } -indexmap = { version = "2.0.2", optional = true } -slab = { version = "0.4", optional = true } -tokio = { version = "1.6", optional = true, features = ["sync"] } -tokio-stream = { version = "0.1.0", optional = true } -tokio-util = { version = "0.7.0", default-features = false, optional = true } -tracing = { version = "0.1.2", default-features = false, features = ["std"], optional = true } -pin-project-lite = { version = "0.2.7", optional = true } -sync_wrapper = { version = "0.1.1", optional = true } +futures-core = { workspace = true, optional = true } +futures-util = { workspace = true, features = ["alloc"], optional = true } +hdrhistogram = { workspace = true, optional = true } +indexmap = { workspace = true, optional = true } +slab = { workspace = true, optional = true } +tokio = { workspace = true, features = ["sync"], optional = true } +tokio-stream = { workspace = true, optional = true } +tokio-util = { workspace = true, optional = true } +tracing = { workspace = true, features = ["std"], optional = true } +pin-project-lite = { workspace = true, optional = true } +sync_wrapper = { workspace = true, optional = true } [dev-dependencies] -futures = "0.3" -hdrhistogram = { version = "7.0", default-features = false } -pin-project-lite = "0.2.7" -tokio = { version = "1.6.2", features = ["macros", "sync", "test-util", "rt-multi-thread"] } -tokio-stream = "0.1" -tokio-test = "0.4" +futures = { workspace = true } +hdrhistogram = { workspace = true } +pin-project-lite = { workspace = true } +tokio = { workspace = true, features = ["macros", "sync", "test-util", "rt-multi-thread"] } +tokio-stream = { workspace = true } +tokio-test = { workspace = true } tower-test = { version = "0.4", path = "../tower-test" } -tracing = { version = "0.1.2", default-features = false, features = ["std"] } -tracing-subscriber = { version = "0.3", default-features = false, features = ["fmt", "ansi"] } -http = "0.2" -lazy_static = "1.4.0" -rand = { version = "0.8", features = ["small_rng"] } -quickcheck = "1" +tracing = { workspace = true, features = ["std"] } +tracing-subscriber = { workspace = true, features = ["fmt", "ansi"] } +http = { workspace = true } +lazy_static = { workspace = true } +rand = { workspace = true, features = ["small_rng"] } +quickcheck = { workspace = true } [package.metadata.docs.rs] all-features = true From e6d7ca7936064f8cf50f89b194c123ab2eae3ab1 Mon Sep 17 00:00:00 2001 From: glendc Date: Mon, 22 Jul 2024 15:43:47 +0200 Subject: [PATCH 2/4] bump MSRV to 1.64 --- README.md | 2 +- tower/Cargo.toml | 2 +- tower/README.md | 4 ++-- tower/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index a0716a42f..c250b1cee 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ pattern. If your protocol is entirely stream based, Tower may not be a good fit. Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been -released at least six months ago. The current MSRV is 1.63.0. +released at least six months ago. The current MSRV is 1.64.0. ## Getting Started diff --git a/tower/Cargo.toml b/tower/Cargo.toml index 6c8c0970d..4529d8ce3 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -20,7 +20,7 @@ clients and servers. categories = ["asynchronous", "network-programming"] keywords = ["io", "async", "non-blocking", "futures", "service"] edition = "2018" -rust-version = "1.63.0" +rust-version = "1.64.0" [features] diff --git a/tower/README.md b/tower/README.md index b277f7433..f5d196d7b 100644 --- a/tower/README.md +++ b/tower/README.md @@ -74,7 +74,7 @@ application code, libraries providing middleware implementations, and libraries that implement servers and/or clients for various network protocols. -Depending on your particular use case, you might use Tower in several ways: +Depending on your particular use case, you might use Tower in several ways: * **Implementing application logic** for a networked program. You might use the [`Service`] trait to model your application's behavior, and use @@ -174,7 +174,7 @@ Tower. Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at least** 6 months. When increasing the MSRV, the new Rust version must have been -released at least six months ago. The current MSRV is 1.63.0. +released at least six months ago. The current MSRV is 1.64.0. ## License diff --git a/tower/src/lib.rs b/tower/src/lib.rs index a509b89cb..a41d22ab7 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -144,7 +144,7 @@ //! //! Tower will keep a rolling MSRV (minimum supported Rust version) policy of **at //! least** 6 months. When increasing the MSRV, the new Rust version must have been -//! released at least six months ago. The current MSRV is 1.63.0. +//! released at least six months ago. The current MSRV is 1.64.0. //! //! [`Service`]: crate::Service //! [`Layer`]: crate::Layer From b89d23e00673cc51ba49511780373b0dec6bf7f2 Mon Sep 17 00:00:00 2001 From: glendc Date: Mon, 22 Jul 2024 15:45:07 +0200 Subject: [PATCH 3/4] also update last reference found for 1.63 --- .github/workflows/CI.yml | 212 +++++++++++++++++++-------------------- 1 file changed, 106 insertions(+), 106 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9d1679d50..c3a599943 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,83 +3,83 @@ name: CI on: push: branches: - - master + - master pull_request: {} env: - MSRV: 1.63.0 + MSRV: 1.64.0 jobs: check-stable: # Run `cargo check` first to ensure that the pushed code at least compiles. runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - override: true - - name: Check - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-features --all-targets + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + override: true + - name: Check + uses: actions-rs/cargo@v1 + with: + command: check + args: --workspace --all-features --all-targets check-docs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - - name: cargo doc - working-directory: ${{ matrix.subcrate }} - env: - RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links" - run: cargo doc --all-features --no-deps + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - name: cargo doc + working-directory: ${{ matrix.subcrate }} + env: + RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links" + run: cargo doc --all-features --no-deps check-msrv: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: "install Rust ${{ env.MSRV }}" - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.MSRV }} - profile: minimal - - name: "install Rust nightly" - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - - name: Select minimal versions - uses: actions-rs/cargo@v1 - with: - command: update - args: -Z minimal-versions - toolchain: nightly - - name: Check - uses: actions-rs/cargo@v1 - with: - command: check - args: --all --all-targets --all-features --locked - toolchain: ${{ env.MSRV }} + - uses: actions/checkout@master + - name: "install Rust ${{ env.MSRV }}" + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.MSRV }} + profile: minimal + - name: "install Rust nightly" + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + - name: Select minimal versions + uses: actions-rs/cargo@v1 + with: + command: update + args: -Z minimal-versions + toolchain: nightly + - name: Check + uses: actions-rs/cargo@v1 + with: + command: check + args: --all --all-targets --all-features --locked + toolchain: ${{ env.MSRV }} cargo-hack: runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - profile: minimal - - name: install cargo-hack - uses: taiki-e/install-action@cargo-hack - - name: cargo hack check - working-directory: ${{ matrix.subcrate }} - run: cargo hack check --each-feature --no-dev-deps --workspace + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - name: install cargo-hack + uses: taiki-e/install-action@cargo-hack + - name: cargo hack check + working-directory: ${{ matrix.subcrate }} + run: cargo hack check --each-feature --no-dev-deps --workspace test-versions: # Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest. @@ -93,68 +93,68 @@ jobs: matrix: rust: [stable, beta, nightly] steps: - - uses: actions/checkout@master - - name: "install Rust ${{ matrix.rust }}" - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ matrix.rust }} - profile: minimal - override: true - - name: Run tests - uses: actions-rs/cargo@v1 - with: - command: test - args: --workspace --all-features + - uses: actions/checkout@master + - name: "install Rust ${{ matrix.rust }}" + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + profile: minimal + override: true + - name: Run tests + uses: actions-rs/cargo@v1 + with: + command: test + args: --workspace --all-features test-msrv: needs: check-msrv runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - name: "install Rust ${{ env.MSRV }}" - uses: actions-rs/toolchain@v1 - with: - toolchain: ${{ env.MSRV }} - profile: minimal - - name: "install Rust nightly" - uses: actions-rs/toolchain@v1 - with: - toolchain: nightly - profile: minimal - - name: Select minimal versions - uses: actions-rs/cargo@v1 - with: - command: update - args: -Z minimal-versions - toolchain: nightly - - name: test - uses: actions-rs/cargo@v1 - with: - command: check - args: --workspace --all-features --locked - toolchain: ${{ env.MSRV }} + - uses: actions/checkout@master + - name: "install Rust ${{ env.MSRV }}" + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ env.MSRV }} + profile: minimal + - name: "install Rust nightly" + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + - name: Select minimal versions + uses: actions-rs/cargo@v1 + with: + command: update + args: -Z minimal-versions + toolchain: nightly + - name: test + uses: actions-rs/cargo@v1 + with: + command: check + args: --workspace --all-features --locked + toolchain: ${{ env.MSRV }} style: needs: check-stable runs-on: ubuntu-latest steps: - - uses: actions/checkout@master - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt - profile: minimal - - name: rustfmt - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt + profile: minimal + - name: rustfmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check deny-check: name: cargo-deny check runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check + - uses: actions/checkout@v1 + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + command: check From ec900c0dbab82ab6f6268d168441bf113d6033b3 Mon Sep 17 00:00:00 2001 From: Toby Lawrence Date: Tue, 23 Jul 2024 11:20:44 -0400 Subject: [PATCH 4/4] anchor futures/futures-* crates to 0.3.22 --- Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 37ab769ef..bbea40253 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,9 +8,9 @@ members = [ ] [workspace.dependencies] -futures = "0.3" -futures-core = "0.3" -futures-util = { version = "0.3", default-features = false } +futures = "0.3.22" +futures-core = "0.3.22" +futures-util = { version = "0.3.22", default-features = false } hdrhistogram = { version = "7.0", default-features = false } http = "0.2" indexmap = "2.0.2"