diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b8edff6b0d..7b91a9d934 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -222,3 +222,32 @@ 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 \ + --package tracing \ + --package tracing-core \ + --package tracing-subscriber \ + --all-features --ignore-private diff --git a/tracing-core/Cargo.toml b/tracing-core/Cargo.toml index aa8006068b..c05cf3f8bf 100644 --- a/tracing-core/Cargo.toml +++ b/tracing-core/Cargo.toml @@ -34,7 +34,7 @@ std = ["lazy_static"] maintenance = { status = "actively-developed" } [dependencies] -lazy_static = { version = "1", optional = true } +lazy_static = { version = "1.0.2", optional = true } [target.'cfg(tracing_unstable)'.dependencies] valuable = { version = "0.1.0", optional = true, default_features = false }