Skip to content

Commit

Permalink
chore: Bump MSRV to 1.46 (#605)
Browse files Browse the repository at this point in the history
* Actually check MSCV on CI

* check broken_intra_doc_links on CI

* clean up CI

* fix other crates

* bump MSRV to 1.42 because of tracing-core

* attempt to fix http not working on 1.42

* use `--workspace` instead of `--all`

`--all` is deprecated

* make tower-service build on 1.42

* force http version 0.2.4

* actually msrv is 1.46 because of tokio

* fix running `cargo fmt`

* clean up

* also run tests on 1.46

* ignore rustsec in time
  • Loading branch information
davidpdrsn authored Oct 19, 2021
1 parent 62e0902 commit 1c9631d
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 33 deletions.
44 changes: 21 additions & 23 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,36 @@ on:

jobs:
check:
# Run `cargo check` first to ensure that the pushed code at least compiles.
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, 1.40.0]
rust: [stable, 1.46.0]
steps:
- uses: actions/checkout@master
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
profile: minimal
override: true
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --all --all-targets --all-features
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

cargo-hack:
runs-on: ubuntu-latest
Expand All @@ -38,29 +52,29 @@ jobs:
curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: cargo hack check
working-directory: ${{ matrix.subcrate }}
run: cargo hack check --each-feature --no-dev-deps --all
run: cargo hack check --each-feature --no-dev-deps --workspace

test-versions:
# Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest.
needs: check
runs-on: ubuntu-latest
strategy:
matrix:
rust: [stable, beta, nightly, 1.40.0]
rust: [stable, beta, nightly, 1.46.0]
steps:
- uses: actions/checkout@master
- 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: --all --all-features
args: --workspace --all-features

style:
# Check style.
needs: check
runs-on: ubuntu-latest
steps:
Expand All @@ -75,22 +89,6 @@ jobs:
with:
command: fmt
args: --all -- --check

# warnings:
# # Check for any warnings. This is informational and thus is allowed to fail.
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# components: clippy
# profile: minimal
# - name: Clippy
# uses: actions-rs/clippy-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# args: --all --all-targets --all-features -- -D warnings

deny-check:
name: cargo-deny check
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ Tower aims to make it as easy as possible to build robust networking clients and
servers. It is protocol agnostic, but is designed around a request / response
pattern. If your protocol is entirely stream based, Tower may not be a good fit.

## Status
## Minimum supported Rust version

Currently, `tower 0.4` is released on crates.io.
tower's MSRV is 1.46.

## Getting Started

Expand Down
2 changes: 1 addition & 1 deletion deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
vulnerability = "deny"
unmaintained = "warn"
notice = "warn"
ignore = []
ignore = ["RUSTSEC-2020-0159"]

[licenses]
unlicensed = "deny"
Expand Down
2 changes: 1 addition & 1 deletion tower-layer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rust_2018_idioms,
unreachable_pub
)]
#![deny(rustdoc::broken_intra_doc_links)]
// `rustdoc::broken_intra_doc_links` is checked on CI

//! Layer traits and extensions.
//!
Expand Down
2 changes: 1 addition & 1 deletion tower-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ edition = "2018"
[dev-dependencies]
http = "0.2"
tower-layer = { version = "0.3", path = "../tower-layer" }
tokio = { version = "1" }
tokio = { version = "1", features = ["macros", "time"] }
futures = "0.3"
2 changes: 1 addition & 1 deletion tower-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
rust_2018_idioms,
unreachable_pub
)]
#![deny(rustdoc::broken_intra_doc_links)]
// `rustdoc::broken_intra_doc_links` is checked on CI

//! Definition of the core `Service` trait to Tower
//!
Expand Down
2 changes: 1 addition & 1 deletion tower-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
unreachable_pub
)]
#![allow(elided_lifetimes_in_paths)]
#![deny(rustdoc::broken_intra_doc_links)]
// `rustdoc::broken_intra_doc_links` is checked on CI

//! Mock `Service` that can be used in tests.

Expand Down
2 changes: 0 additions & 2 deletions tower/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ tokio-test = "0.4"
tower-test = { version = "0.4", path = "../tower-test" }
tracing-subscriber = "0.2.14"
http = "0.2"
# env_logger = { version = "0.5.3", default-features = false }
# log = "0.4.1"

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion tower/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
rust_2018_idioms,
unreachable_pub
)]
#![deny(rustdoc::broken_intra_doc_links)]
#![allow(elided_lifetimes_in_paths, clippy::type_complexity)]
#![cfg_attr(test, allow(clippy::float_cmp))]
#![cfg_attr(docsrs, feature(doc_cfg))]
// `rustdoc::broken_intra_doc_links` is checked on CI

//! `async fn(Request) -> Result<Response, Error>`
//!
Expand Down

0 comments on commit 1c9631d

Please sign in to comment.