From b9b141f3118711697baa4e21937d299f7140b8e5 Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 24 Mar 2022 05:36:21 +0100 Subject: [PATCH 1/4] chore: add a minimal-versions check --- .github/workflows/check.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index bb1e89404d..7f64be99b4 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -77,3 +77,28 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all --examples --tests --benches -- -D warnings + + minimal-versions: + # Check for minimal-versions errors where a dependency is too + # underconstrained to build on the minimal supported version of all + # dependencies in the dependency graph. + name: minimal-versions + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + profile: minimal + override: true + - name: Install cargo-hack + run: | + 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: "check --all-features -Z minimal-versions" + run: | + # Remove dev-dependencies from Cargo.toml to prevent the next `cargo update` + # from determining minimal versions based on dev-dependencies. + cargo hack --remove-dev-deps --workspace + # Update Cargo.lock to minimal version dependencies. + cargo update -Z minimal-versions + cargo hack check --all-features --ignore-private From bcf8a7c467f028792d333c9acdecb4977b7a05e2 Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 24 Mar 2022 05:59:10 +0100 Subject: [PATCH 2/4] chore: bump parking_lot dependency to abide by minimal-versions --- tracing-subscriber/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-subscriber/Cargo.toml b/tracing-subscriber/Cargo.toml index 9b9bb46283..68b5e75dfb 100644 --- a/tracing-subscriber/Cargo.toml +++ b/tracing-subscriber/Cargo.toml @@ -57,7 +57,7 @@ serde = { version = "1.0", optional = true } tracing-serde = { path = "../tracing-serde", version = "0.2", optional = true } # opt-in deps -parking_lot = { version = ">= 0.7, <= 0.12", optional = true } +parking_lot = { version = ">= 0.9.0, <= 0.12", optional = true } # registry sharded-slab = { version = "0.1.0", optional = true } From 1e2a565a680c217e5719d5ae32ddb9c079e7f6b4 Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 24 Mar 2022 06:34:47 +0100 Subject: [PATCH 3/4] chore: limit packages being tested for minimal-versions --- .github/workflows/check.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 7f64be99b4..d3b34ccd76 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -101,4 +101,8 @@ jobs: cargo hack --remove-dev-deps --workspace # Update Cargo.lock to minimal version dependencies. cargo update -Z minimal-versions - cargo hack check --all-features --ignore-private + cargo hack check \ + --package tracing \ + --package tracing-core \ + --package tracing-subscriber \ + --all-features --ignore-private From 0fc30ac04d625f3203a27363451d68772ca96c6e Mon Sep 17 00:00:00 2001 From: John-John Tedro Date: Thu, 24 Mar 2022 06:45:18 +0100 Subject: [PATCH 4/4] chore: bump lazy_static dependency to abide by minimal-versions --- tracing-core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tracing-core/Cargo.toml b/tracing-core/Cargo.toml index d9536aaeca..36b7a59683 100644 --- a/tracing-core/Cargo.toml +++ b/tracing-core/Cargo.toml @@ -35,7 +35,7 @@ std = ["lazy_static", "alloc"] maintenance = { status = "actively-developed" } [dependencies] -lazy_static = { version = "1", optional = true } +lazy_static = { version = "1.0.2", optional = true } [package.metadata.docs.rs] all-features = true