From 92b549fd628cf8e08ef91133a55a289c419971e8 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sat, 14 Sep 2024 16:08:19 +0000 Subject: [PATCH 1/3] CI: Pin Kani verifier to `v0.54.0` to avoid OOM errors with `v0.55.0` --- .github/workflows/Kani.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Kani.yml b/.github/workflows/Kani.yml index 59c0bff2..0307966d 100644 --- a/.github/workflows/Kani.yml +++ b/.github/workflows/Kani.yml @@ -53,3 +53,5 @@ jobs: uses: model-checking/kani-github-action@v1.0 with: args: --features 'sync, future' + # Workaround for https://github.com/moka-rs/moka/issues/457 + kani-version: '0.54.0' From a70218a32108fec0e2c2f17020e9a01392dc13a6 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sat, 14 Sep 2024 16:26:56 +0000 Subject: [PATCH 2/3] Fix the CI for the MSRV 1.65.0 - Pin `tokio-util` version to `0.7.11`. --- .ci_extras/pin-crate-vers-msrv.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/.ci_extras/pin-crate-vers-msrv.sh b/.ci_extras/pin-crate-vers-msrv.sh index b1e8f239..941b0d0d 100755 --- a/.ci_extras/pin-crate-vers-msrv.sh +++ b/.ci_extras/pin-crate-vers-msrv.sh @@ -6,4 +6,5 @@ set -eux # cargo update -p --precise cargo update -p actix-rt --precise 2.9.0 cargo update -p cc --precise 1.0.105 +cargo update -p tokio-util --precise 0.7.11 cargo update -p tokio --precise 1.38.1 From bd5e447bc228de4e43c3573e9c741b5b47d01a70 Mon Sep 17 00:00:00 2001 From: Tatsuya Kawano Date: Sat, 14 Sep 2024 16:28:18 +0000 Subject: [PATCH 3/3] Move the `check-cfg` lint stuff from the build scritp to `Cargo.toml` --- Cargo.toml | 11 +++++++++++ build.rs | 25 +------------------------ 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0fb928b5..b363bc2a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -87,6 +87,17 @@ trybuild = "1.0" [target.'cfg(rustver)'.build-dependencies] rustc_version = "0.4.0" +[lints.rust] +unexpected_cfgs = { level = "warn", check-cfg = [ + "cfg(armv5te)", + "cfg(beta_clippy)", + "cfg(kani)", + "cfg(mips)", + "cfg(rustver)", + "cfg(skip_large_mem_tests)", + "cfg(trybuild)", +] } + # https://docs.rs/about/metadata [package.metadata.docs.rs] # Build the doc at docs.rs with some features enabled. diff --git a/build.rs b/build.rs index b82d02a6..72a59c0e 100644 --- a/build.rs +++ b/build.rs @@ -1,15 +1,3 @@ -#![allow(unexpected_cfgs)] // for `#[cfg(rustver)]` in this build.rs. - -const ALLOWED_CFG_NAMES: &[&str] = &[ - "armv5te", - "beta_clippy", - "kani", - "mips", - "rustver", - "skip_large_mem_tests", - "trybuild", -]; - #[cfg(rustver)] fn main() { use rustc_version::version; @@ -18,18 +6,7 @@ fn main() { "cargo:rustc-env=RUSTC_SEMVER={}.{}", version.major, version.minor ); - - allow_cfgs(ALLOWED_CFG_NAMES); } #[cfg(not(rustver))] -fn main() { - allow_cfgs(ALLOWED_CFG_NAMES); -} - -/// Tells `rustc` to allow `#[cfg(...)]` with the given names. -fn allow_cfgs(names: &[&str]) { - for name in names.iter() { - println!("cargo:rustc-check-cfg=cfg({name})"); - } -} +fn main() {}