chore: Bump MSRV to 1.46 (#605)

* 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
This commit is contained in:
David Pedersen 2021-10-19 16:28:55 +02:00 committed by GitHub
parent 62e09024aa
commit 1c9631d7b3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 29 additions and 33 deletions

View File

@ -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
@ -38,7 +52,7 @@ 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.
@ -46,21 +60,21 @@ jobs:
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:
@ -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

View File

@ -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

View File

@ -2,7 +2,7 @@
vulnerability = "deny"
unmaintained = "warn"
notice = "warn"
ignore = []
ignore = ["RUSTSEC-2020-0159"]
[licenses]
unlicensed = "deny"

View File

@ -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.
//!

View File

@ -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"

View File

@ -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
//!

View File

@ -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.

View File

@ -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

View File

@ -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>`
//!