From 874448c112391bcb46a7026616bbabcb369b5ce2 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Thu, 26 Dec 2024 21:13:14 +0200 Subject: [PATCH 1/5] [CI] fix cargo audit failing to run --- .github/workflows/CICD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index c2a5694ba8..660d2a3453 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -153,6 +153,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - run: cargo install cargo-audit --locked - run: cargo audit build: From be62a4cea4f603a3bb74d1c43a98fd2bd9dd330c Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Thu, 26 Dec 2024 21:19:02 +0200 Subject: [PATCH 2/5] Upgrade clap to fix cargo audit failure on anstream 0.6.4 which is provided by clap 4.4.12 --- .github/workflows/CICD.yml | 2 +- Cargo.lock | 39 +++++++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 660d2a3453..9a44b831d7 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -152,8 +152,8 @@ jobs: name: cargo audit runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - run: cargo install cargo-audit --locked + - uses: actions/checkout@v4 - run: cargo audit build: diff --git a/Cargo.lock b/Cargo.lock index 5ba2efa226..a7b39fce65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -28,15 +28,16 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", + "is_terminal_polyfill", "utf8parse", ] @@ -66,12 +67,12 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "2109dbce0e72be3ec00bed26e6a7479ca384ad226efdd66db8fa2e3a38c83125" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -252,31 +253,31 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "clap" -version = "4.4.12" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfab8ba68f3668e89f6ff60f5b205cea56aa7b769451a59f34b8682f51c056d" +checksum = "0fbb260a053428790f3de475e304ff84cdbc4face759ea7a3e64c1edd938a7fc" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.4.12" +version = "4.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb7fb5e4e979aec3be7791562fcba452f94ad85e954da024396433e0e25a79e9" +checksum = "64b17d7ea74e9f833c7dbf2cbe4fb12ff26783eda4782a8975b72f895c9b4d99" dependencies = [ "anstream", "anstyle", "clap_lex", - "strsim", + "strsim 0.11.1", "terminal_size", ] [[package]] name = "clap_lex" -version = "0.6.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "702fc72eb24e5a1e48ce58027a675bc24edd52096d5397d4aea7c6dd9eca0bd1" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "clircle" @@ -347,7 +348,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", + "strsim 0.10.0", "syn", ] @@ -668,6 +669,12 @@ dependencies = [ "serde", ] +[[package]] +name = "is_terminal_polyfill" +version = "1.70.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" + [[package]] name = "itertools" version = "0.13.0" @@ -1252,6 +1259,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "syn" version = "2.0.57" From d660cca8a9903bb119b38153b3ac085cc151c92b Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Thu, 26 Dec 2024 21:30:16 +0200 Subject: [PATCH 3/5] Bump MSRV to 1.74 released over a year ago --- CHANGELOG.md | 1 + Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4941340e35..16bbc52210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ - Support 'statically linked binary' for aarch64 in 'Release' page, see #2992 (@tzq0301) - Update options in shell completions and the man page of `bat`, see #2995 (@akinomyoga) - Update nix dev-dependency to v0.29.0, see #3112 (@decathorpe) +- Bump MSRV to [1.74](https://blog.rust-lang.org/2023/11/16/Rust-1.74.0.html), see #3154 (@keith-hall) ## Syntaxes diff --git a/Cargo.toml b/Cargo.toml index 2acf306324..6a17216a76 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,7 +10,7 @@ version = "0.24.0" exclude = ["assets/syntaxes/*", "assets/themes/*"] build = "build/main.rs" edition = '2021' -rust-version = "1.70" +rust-version = "1.74" [features] default = ["application"] From 63560c473396807d35e84dc1a4ca7457b98cc4e5 Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 30 Dec 2024 20:53:31 +0200 Subject: [PATCH 4/5] add cargo audit config file ignore yaml-rust advisory for now --- .cargo/audit.toml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .cargo/audit.toml diff --git a/.cargo/audit.toml b/.cargo/audit.toml new file mode 100644 index 0000000000..527afada54 --- /dev/null +++ b/.cargo/audit.toml @@ -0,0 +1,2 @@ +[advisories] +ignore = ["RUSTSEC-2024-0320"] From 75fadb8d1c7dd88e90c0e7a0fa7e56a780160c1d Mon Sep 17 00:00:00 2001 From: Keith Hall Date: Mon, 30 Dec 2024 21:12:48 +0200 Subject: [PATCH 5/5] ignore warning for idna also --- .cargo/audit.toml | 2 +- Cargo.lock | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 527afada54..90a578488c 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -1,2 +1,2 @@ [advisories] -ignore = ["RUSTSEC-2024-0320"] +ignore = ["RUSTSEC-2024-0320", "RUSTSEC-2024-0421"] diff --git a/Cargo.lock b/Cargo.lock index a7b39fce65..db7ff9894d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -521,9 +521,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "form_urlencoded" -version = "1.1.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -650,9 +650,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.3.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -903,9 +903,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pkg-config" @@ -1475,9 +1475,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5" [[package]] name = "unicode-ident" @@ -1508,9 +1508,9 @@ checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" [[package]] name = "url" -version = "2.3.1" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna",