From 4421a56d2ba48e0f6ff6f6feb5da30a3d9fd483d Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 14:28:02 +0200 Subject: [PATCH 1/5] Use version 2 of Cargo's feature resolver --- Cargo.toml | 1 + examples/Cargo.toml | 1 + 2 files changed, 2 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index a221fbc5a9..9870fde13e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,3 +10,4 @@ members = [ # with `cargo +nightly update -Z minimal-versions` "internal-minimal-versions", ] +resolver = "2" 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" From 58b2dffc21f8fd5d272d8fae75647713c7c2d5f6 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 17:18:31 +0200 Subject: [PATCH 2/5] 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. --- axum/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 20f7178a03..42e1596c94 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -56,7 +56,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" From 6fa5272305bed5f584e6c02781424d4935df1265 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 17:47:12 +0200 Subject: [PATCH 3/5] Clean up and fix MSRV CI job --- .github/workflows/CI.yml | 10 +++++++--- Cargo.toml | 5 ----- internal-minimal-versions/Cargo.toml | 16 ---------------- internal-minimal-versions/src/lib.rs | 1 - 4 files changed, 7 insertions(+), 25 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 359c6003e5..4e796d37b5 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 9870fde13e..7853fc3e43 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +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/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 From 1d0800bcf85037382d53dadccb343255db9927bc Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 14:28:39 +0200 Subject: [PATCH 4/5] Fix some intra-doc links not resolving correctly on docs.rs --- axum/Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 42e1596c94..6edbc3bcbf 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -25,6 +25,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.6" } From 955b0ff01efdca877a2353666e0c05120f4ff1c6 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Thu, 28 Jul 2022 18:27:54 +0200 Subject: [PATCH 5/5] Bump minimum version of tower MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … to avoid dependencies with a broken minimum-versions chain. --- axum/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axum/Cargo.toml b/axum/Cargo.toml index 6edbc3bcbf..4aeac8bb9b 100644 --- a/axum/Cargo.toml +++ b/axum/Cargo.toml @@ -46,7 +46,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"