From ca0d9d4cdd802989e1aac90db8766878bc5150ba Mon Sep 17 00:00:00 2001 From: Mrmaxmeier Date: Thu, 29 Aug 2024 22:06:49 +0200 Subject: [PATCH 1/4] CI: Add -Zminimal-versions job --- .github/workflows/ci.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 96bfb5cd0..fe7735702 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -70,6 +70,24 @@ jobs: command: fmt args: --all -- --check + check_minimal_versions: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - name: resolve minimal versions + run: cargo -Z minimal-versions update + - name: check + run: cargo check --all-features + - name: test + run: cargo test --all-features + style_and_docs: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name strategy: From 42295d081164eb2909f4802eb877f2f66d4e55f9 Mon Sep 17 00:00:00 2001 From: Mrmaxmeier Date: Thu, 29 Aug 2024 21:58:45 +0200 Subject: [PATCH 2/4] Bump anyhow dev-dep to fix build with -Zminimal-versions --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c0ff120b5..4589d9cc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -60,9 +60,9 @@ bencher = "0.1.5" getrandom = { version = "0.2.15", features = ["js", "std"] } walkdir = "2.5.0" time = { workspace = true, features = ["formatting", "macros"] } -anyhow = "1" +anyhow = "1.0.60" clap = { version = "=4.4.18", features = ["derive"] } -tempfile = "3" +tempfile = "3.8" [features] aes-crypto = ["aes", "constant_time_eq", "hmac", "pbkdf2", "sha1", "rand", "zeroize"] From 63f81f080aa93f939f94509243d98eba1d8aaabd Mon Sep 17 00:00:00 2001 From: Mrmaxmeier Date: Thu, 29 Aug 2024 21:59:04 +0200 Subject: [PATCH 3/4] Relax dependency bounds These relaxed bounds don't impact existing builds as they're all SemVer compatible. Specifying lower bounds allows projects with dependencies that pin these to lower versions do build without version resolution conflicts. --- Cargo.toml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4589d9cc5..62e116b9c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,29 +23,29 @@ all-features = true rustdoc-args = ["--cfg", "docsrs"] [workspace.dependencies] -time = { version = "0.3.36", default-features = false } +time = { version = "0.3.1", default-features = false } [dependencies] -aes = { version = "0.8.4", optional = true } -bzip2 = { version = "0.4.4", optional = true } -chrono = { version = "0.4.38", optional = true } -constant_time_eq = { version = "0.3.1", optional = true } -crc32fast = "1.4.2" -displaydoc = { version = "0.2.5", default-features = false } -flate2 = { version = "1.0.33", default-features = false, optional = true } +aes = { version = "0.8.0", optional = true } +bzip2 = { version = "0.4.3", optional = true } +chrono = { version = "0.4.0", optional = true } +constant_time_eq = { version = "0.3.0", optional = true } +crc32fast = "1.4.0" +displaydoc = { version = "0.2.0", default-features = false } +flate2 = { version = "1.0.0", default-features = false, optional = true } indexmap = "2" -hmac = { version = "0.12.1", optional = true, features = ["reset"] } -memchr = "2.7.4" -pbkdf2 = { version = "0.12.2", optional = true } -rand = { version = "0.8.5", optional = true } -sha1 = { version = "0.10.6", optional = true } -thiserror = "2.0.3" +hmac = { version = "0.12.0", optional = true, features = ["reset"] } +memchr = "2.7" +pbkdf2 = { version = "0.12", optional = true } +rand = { version = "0.8", optional = true } +sha1 = { version = "0.10", optional = true } +thiserror = "2" time = { workspace = true, optional = true, features = [ "std", ] } -zeroize = { version = "1.8.1", optional = true, features = ["zeroize_derive"] } -zstd = { version = "0.13.2", optional = true, default-features = false } -zopfli = { version = "0.8.1", optional = true } +zeroize = { version = "1.8", optional = true, features = ["zeroize_derive"] } +zstd = { version = "0.13", optional = true, default-features = false } +zopfli = { version = "0.8", optional = true } deflate64 = { version = "0.1.9", optional = true } lzma-rs = { version = "0.3.0", default-features = false, optional = true } From 9999c92e59ef778e0a2ba2bcab6d945e1aa5c1fc Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 21 Nov 2024 14:45:19 +0100 Subject: [PATCH 4/4] Cargo.toml: elide .0 patch versions --- Cargo.toml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 62e116b9c..73e4aee47 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,15 +26,15 @@ rustdoc-args = ["--cfg", "docsrs"] time = { version = "0.3.1", default-features = false } [dependencies] -aes = { version = "0.8.0", optional = true } +aes = { version = "0.8", optional = true } bzip2 = { version = "0.4.3", optional = true } -chrono = { version = "0.4.0", optional = true } -constant_time_eq = { version = "0.3.0", optional = true } -crc32fast = "1.4.0" -displaydoc = { version = "0.2.0", default-features = false } -flate2 = { version = "1.0.0", default-features = false, optional = true } +chrono = { version = "0.4", optional = true } +constant_time_eq = { version = "0.3", optional = true } +crc32fast = "1.4" +displaydoc = { version = "0.2", default-features = false } +flate2 = { version = "1.0", default-features = false, optional = true } indexmap = "2" -hmac = { version = "0.12.0", optional = true, features = ["reset"] } +hmac = { version = "0.12", optional = true, features = ["reset"] } memchr = "2.7" pbkdf2 = { version = "0.12", optional = true } rand = { version = "0.8", optional = true } @@ -47,7 +47,7 @@ zeroize = { version = "1.8", optional = true, features = ["zeroize_derive"] } zstd = { version = "0.13", optional = true, default-features = false } zopfli = { version = "0.8", optional = true } deflate64 = { version = "0.1.9", optional = true } -lzma-rs = { version = "0.3.0", default-features = false, optional = true } +lzma-rs = { version = "0.3", default-features = false, optional = true } [target.'cfg(any(all(target_arch = "arm", target_pointer_width = "32"), target_arch = "mips", target_arch = "powerpc"))'.dependencies] crossbeam-utils = "0.8.20" @@ -58,7 +58,7 @@ arbitrary = { version = "1.3.2", features = ["derive"] } [dev-dependencies] bencher = "0.1.5" getrandom = { version = "0.2.15", features = ["js", "std"] } -walkdir = "2.5.0" +walkdir = "2.5" time = { workspace = true, features = ["formatting", "macros"] } anyhow = "1.0.60" clap = { version = "=4.4.18", features = ["derive"] }