From 83a404837c3907ef13d3522e9277421cba8a64d9 Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 22 Mar 2022 22:41:33 -0700 Subject: [PATCH 1/4] Fix incorrect space in clippy.yml workflow YAML is a harsh mistress --- .github/workflows/clippy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index b1aa0ec..0875727 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -32,7 +32,7 @@ jobs: with: profile: minimal toolchain: ${{ matrix.rust }} - override: true + override: true components: clippy - shell: bash run: | From 022a1521d302ea9f87eb872a363c3282e1f3d5e3 Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 22 Mar 2022 22:45:07 -0700 Subject: [PATCH 2/4] Revert "Bump claimed MSRV to 1.39" Apparently the version actually required by the time/unstable_kv feature is much higher than 1.39. In fact, by my tests it appears to start working around 1.53 This makes it worthwhile to test it seperately and restore the old MSRV. This reverts commit 17d94eb42ab663be7cf0f56267ef9b258f165b4f. --- Cargo.toml | 2 +- README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index f85c146..645f3d4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ edition = "2018" # # The first version of Cargo that supports this field was in Rust 1.56.0. # In older releases, the field will be ignored, and Cargo will display a warning. -rust-version = "1.39" +rust-version = "1.38" [lib] path = "lib.rs" diff --git a/README.md b/README.md index 4a650f1..78d825b 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,8 @@ slog-rs Gitter Chat - - Minimum Rust Version 1.38 + + Minimum Rust Version 1.38

From 867e45249273319711b7fb178dbd98d2963e290d Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 22 Mar 2022 22:52:30 -0700 Subject: [PATCH 3/4] Don't test log/unstable_kv feature on the MSRV Due to its unstable feature, it requires a recent compiler and we cannot reasonably make MSRV guarentees for their project. Add disclaimer about this to the Cargo.toml file --- .github/workflows/test.yml | 6 ++++++ Cargo.toml | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d7bca6..03d86e1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,6 +29,9 @@ jobs: fail-fast: false # Even if one job fails we still want to see the other ones matrix: # 1.39 is MSRV. Keep in sync with Cargo.toml + # + # There are no MSRV guarentees for the kv_unstable feature. + # See `Cargo.toml` for more details. rust: [1.39, stable, nightly] # NOTE: Features to test must be specified manually. They are applied to all versions seperately. # @@ -37,6 +40,9 @@ jobs: # # Specific feature combos can be overriden per-version with 'include' and 'exclude' features: ["", "kv_unstable"] + exclude: + - rust: 1.39 # MSRV (see above) + features: "kv_unstable" steps: - uses: actions/checkout@v2 diff --git a/Cargo.toml b/Cargo.toml index 645f3d4..9b5b576 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,10 @@ edition = "2018" # # The first version of Cargo that supports this field was in Rust 1.56.0. # In older releases, the field will be ignored, and Cargo will display a warning. +# +# DISCLAIMER: +# The log/kv_unstable feature requires a recent (stable) compiler. +# It will not compile with this claimed MSRV and requires a recent (stable) compiler. rust-version = "1.38" [lib] From c6b506a21bb8fc47abd5aa0d5de0d9c17f523b0a Mon Sep 17 00:00:00 2001 From: Techcable Date: Tue, 22 Mar 2022 22:59:52 -0700 Subject: [PATCH 4/4] Don't run tests on MSRV (only cargo check) The tests break because of the `time` crate (a dev-dependency). To workaround this we only run `cargo check` on the MSRV --- .github/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 03d86e1..40e3474 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -50,8 +50,14 @@ jobs: with: toolchain: ${{ matrix.rust }} override: true - # NOTE: We only run `cargo test`. No need for a seperate `cargo check` + - name: Check + run: | + cargo check --verbose --features "${{ matrix.features }}" + # A failing `cargo check` always fails the build + continue-on-error: false + # NOTE: We only run `cargo test` if version > MSRV. Tests break on old MSRV due to + # a dev-dependency. - name: Test run: | cargo test --verbose --features "${{ matrix.features }}" - + if: "${{ matrix.rust == 'stable' || matrix.rust == 'nightly' }}"