From f424c9d5124b114befad22506d794ef616e6558a Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 19:14:31 +0200 Subject: [PATCH] Fix intra-doc links on docs.rs (#1205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Use version 2 of Cargo's feature resolver * Increase minimum version of tungstenite Tungstenite 0.17.1 has a higher MSRV, and there should be no reason to use it over 0.17.2. * Clean up and fix MSRV CI job * Fix some intra-doc links not resolving correctly on docs.rs * Bump minimum version of tower … to avoid dependencies with a broken minimum-versions chain. --- .github/workflows/CI.yml | 10 +++++++--- Cargo.toml | 6 +----- axum/Cargo.toml | 7 +++++-- examples/Cargo.toml | 1 + internal-minimal-versions/Cargo.toml | 16 ---------------- internal-minimal-versions/src/lib.rs | 1 - 6 files changed, 14 insertions(+), 27 deletions(-) delete mode 100644 internal-minimal-versions/Cargo.toml delete mode 100644 internal-minimal-versions/src/lib.rs diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 114720589e..b8e88122c9 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -2,7 +2,7 @@ name: CI env: CARGO_TERM_COLOR: always - MSRV: 1.56.0 + MSRV: 1.56 on: push: @@ -113,6 +113,12 @@ jobs: command: update args: -Z minimal-versions toolchain: nightly + - name: Fix up Cargo.lock + uses: actions-rs/cargo@v1 + with: + command: update + args: -p crc32fast --precise 1.1.1 + toolchain: nightly - name: Run tests uses: actions-rs/cargo@v1 with: @@ -121,7 +127,6 @@ jobs: -p axum -p axum-extra -p axum-core - -p internal-minimal-versions --all-features --all-targets --locked @@ -135,7 +140,6 @@ jobs: command: test args: > -p axum-macros - -p internal-minimal-versions --doc --all-features --locked diff --git a/Cargo.toml b/Cargo.toml index a221fbc5a9..7853fc3e43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,5 @@ members = [ "axum-core", "axum-extra", "axum-macros", - - # internal crate used to bump the minimum versions we - # get for some dependencies which otherwise wouldn't build - # with `cargo +nightly update -Z minimal-versions` - "internal-minimal-versions", ] +resolver = "2" diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 8341f22a3b..7f4eea99e5 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -24,6 +24,9 @@ query = ["serde_urlencoded"] tower-log = ["tower/log"] ws = ["tokio-tungstenite", "sha-1", "base64"] +# Required for intra-doc links to resolve correctly +__private_docs = ["tower/full", "tower-http/full"] + [dependencies] async-trait = "0.1.43" axum-core = { path = "../axum-core", version = "0.2.8" } @@ -42,7 +45,7 @@ pin-project-lite = "0.2.7" serde = "1.0" sync_wrapper = "0.1.1" tokio = { version = "1", features = ["time"] } -tower = { version = "0.4.11", default-features = false, features = ["util", "make"] } +tower = { version = "0.4.13", default-features = false, features = ["util", "make"] } tower-http = { version = "0.3.0", features = ["util", "map-response-body"] } tower-layer = "0.3" tower-service = "0.3" @@ -55,7 +58,7 @@ multer = { version = "2.0.0", optional = true } serde_json = { version = "1.0", features = ["raw_value"], optional = true } serde_urlencoded = { version = "0.7", optional = true } sha-1 = { version = "0.10", optional = true } -tokio-tungstenite = { version = "0.17", optional = true } +tokio-tungstenite = { version = "0.17.2", optional = true } [dev-dependencies] anyhow = "1.0" diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 4f10fc347e..6696429212 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,3 +1,4 @@ [workspace] members = ["*"] exclude = ["target"] +resolver = "2" diff --git a/internal-minimal-versions/Cargo.toml b/internal-minimal-versions/Cargo.toml deleted file mode 100644 index 9e2a69c7d4..0000000000 --- a/internal-minimal-versions/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "internal-minimal-versions" -version = "0.1.0" -edition = "2021" -publish = false - -# these dependencies don't build if installed with `cargo +nightly update -Z -# minimal-versions` so we add them here to make sure we get a version that -# does build -# -# this only matters for axum's CI -[dependencies] -crc32fast = "1.3.2" -gcc = "0.3.55" -time = "0.3.9" -tungstenite = "0.17.2" diff --git a/internal-minimal-versions/src/lib.rs b/internal-minimal-versions/src/lib.rs deleted file mode 100644 index 36db4933d9..0000000000 --- a/internal-minimal-versions/src/lib.rs +++ /dev/null @@ -1 +0,0 @@ -// intentionally left empty