Skip to content

Commit

Permalink
Merge branch 'master' into tim/clone-sync-service
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar authored Dec 10, 2024
2 parents ae407cc + 6283f3a commit 1efc953
Show file tree
Hide file tree
Showing 23 changed files with 206 additions and 185 deletions.
169 changes: 63 additions & 106 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,83 +3,60 @@ 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@v4
- uses: dtolnay/rust-toolchain@stable
- name: Check
run: cargo check --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@v4
- uses: dtolnay/rust-toolchain@stable
- 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@v4
- name: "install Rust ${{ env.MSRV }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- name: "install Rust nightly"
uses: dtolnay/rust-toolchain@nightly
- name: Select minimal versions
run: cargo update -Z minimal-versions
- name: Check
run: |
rustup default ${{ env.MSRV }}
cargo check --all --all-targets --all-features --locked
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@v4
- uses: dtolnay/rust-toolchain@stable
- 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.
Expand All @@ -93,68 +70,48 @@ 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@v4
- name: "install Rust ${{ matrix.rust }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Run tests
run: cargo test --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@v4
- name: "install Rust ${{ env.MSRV }}"
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- name: "install Rust nightly"
uses: dtolnay/rust-toolchain@nightly
- name: Select minimal versions
run: cargo update -Z minimal-versions
- name: test
run: |
rustup default ${{ env.MSRV }}
cargo check --workspace --all-features --locked
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@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: rustfmt
run: cargo fmt --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@v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check
13 changes: 3 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,13 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v1
uses: actions/checkout@v4
- name: Install nightly Rust
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
profile: minimal
- name: Generate documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --workspace --no-deps --all-features
# Tower uses nightly-only RustDoc features
toolchain: nightly
run: cargo doc --workspace --no-deps --all-features
env:
# Enable the RustDoc `#[doc(cfg(...))]` attribute.
RUSTDOCFLAGS: --cfg docsrs
Expand All @@ -36,4 +30,3 @@ jobs:
build_dir: target/doc
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
if: github.repository_owner == 'tower-rs'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- uses: taiki-e/[email protected]
with:
prefix: "(tower)|(tower-[a-z]+)"
Expand Down
20 changes: 20 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,23 @@ members = [
"tower-service",
"tower-test",
]

[workspace.dependencies]
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 = "1"
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 = "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 }
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ edition = "2018"
# [dependencies] instead.
[dev-dependencies]
tower = { version = "0.4", path = "../tower", features = ["full"] }
tower-service = "0.3"
tower-service = "0.3"
tokio = { version = "1.0", features = ["full"] }
rand = "0.8"
pin-project = "1.0"
futures = "0.3"
futures = "0.3.22"
tracing = "0.1"
tracing-subscriber = "0.2"
hdrhistogram = "7"
Expand Down
18 changes: 18 additions & 0 deletions tower-layer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# 0.3.3 (August 1, 2024)

### Added

- **builder,util**: add convenience methods for boxing services ([#616])
- **all**: new functions const when possible ([#760])

[#616]: https://github.com/tower-rs/tower/pull/616
[#760]: https://github.com/tower-rs/tower/pull/760

# 0.3.2 (Octpber 10, 2022)

## Added

- Implement `Layer` for tuples of up to 16 elements ([#694])

[#694]: https://github.com/tower-rs/tower/pull/694

# 0.3.1 (January 7, 2021)

### Added
Expand Down
8 changes: 4 additions & 4 deletions tower-layer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ name = "tower-layer"
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.1.x" git tag.
version = "0.3.2"
version = "0.3.3"
authors = ["Tower Maintainers <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/tower-rs/tower"
homepage = "https://github.com/tower-rs/tower"
documentation = "https://docs.rs/tower-layer/0.3.0-alpha.2"
documentation = "https://docs.rs/tower-layer/0.3.3"
description = """
Decorates a `Service` to allow easy composition between `Service`s.
"""
Expand All @@ -22,5 +22,5 @@ edition = "2018"
[dependencies]

[dev-dependencies]
tower-service = { version = "0.3.0", path = "../tower-service" }
tower = { version = "0.4", path = "../tower" }
tower-service = { path = "../tower-service" }
tower = { path = "../tower" }
10 changes: 8 additions & 2 deletions tower-service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Unreleased
# 0.3.2

- Clarify subtlety around cloning and readiness in the `Service` docs.
- **all**: new functions const when possible ([#760])
- **documentation**: Clarify subtlety around cloning and readiness in the `Service` docs. ([#622])
- **documentation**: service: Call inner.poll_ready() in docs when cloning inner ([#679])

[#760]: https://github.com/tower-rs/tower/pull/760
[#622]: https://github.com/tower-rs/tower/pull/662
[#679]: https://github.com/tower-rs/tower/pull/679

# 0.3.1 (November 29, 2019)

Expand Down
10 changes: 5 additions & 5 deletions tower-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ name = "tower-service"
# - README.md
# - Update CHANGELOG.md.
# - Create "v0.2.x" git tag.
version = "0.3.2"
version = "0.3.3"
authors = ["Tower Maintainers <[email protected]>"]
license = "MIT"
readme = "README.md"
repository = "https://github.com/tower-rs/tower"
homepage = "https://github.com/tower-rs/tower"
documentation = "https://docs.rs/tower-service/0.3.1"
documentation = "https://docs.rs/tower-service/0.3.3"
description = """
Trait representing an asynchronous, request / response based, client or server.
"""
Expand All @@ -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 }
4 changes: 4 additions & 0 deletions tower-test/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.5.0 (August 1, 2023)

- Update dependency on tower to 0.5.0-alpha.1.

# 0.4.0 (January 7, 2021)

- Updated `tokio-test` dependency to 0.4
Expand Down
Loading

0 comments on commit 1efc953

Please sign in to comment.