From 38eb938418143cab171f197066c6d8d1d7935710 Mon Sep 17 00:00:00 2001 From: Zach Schuermann Date: Wed, 20 Nov 2024 15:11:32 -0800 Subject: [PATCH] add MSRV (#504) add MSRV and test it in CI with `cargo-msrv`. currently set to rust `1.80` (version when `LazyLock` was introduced) --- .github/workflows/build.yml | 21 +++++++++++++++++++++ Cargo.toml | 1 + acceptance/Cargo.toml | 1 + derive-macros/Cargo.toml | 3 +-- ffi-proc-macros/Cargo.toml | 3 ++- ffi/Cargo.toml | 1 + kernel/Cargo.toml | 1 + 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7dfcde225..9bdbe6c0d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,27 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: format run: cargo fmt -- --check + msrv: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install minimal stable and cargo msrv + uses: actions-rs/toolchain@v1 + with: + profile: default + toolchain: stable + override: true + - uses: Swatinem/rust-cache@v2 + - name: Install cargo-msrv + shell: bash + run: | + cargo install cargo-msrv --locked + - name: verify-msrv + run: | + cargo msrv --path kernel/ verify --all-features + cargo msrv --path derive-macros/ verify --all-features + cargo msrv --path ffi/ verify --all-features + cargo msrv --path ffi-proc-macros/ verify --all-features docs: runs-on: ubuntu-latest env: diff --git a/Cargo.toml b/Cargo.toml index 21d26343a..df4bffe57 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ keywords = ["deltalake", "delta", "datalake"] license = "Apache-2.0" repository = "https://github.com/delta-io/delta-kernel-rs" readme = "README.md" +rust-version = "1.80" version = "0.4.0" [workspace.dependencies] diff --git a/acceptance/Cargo.toml b/acceptance/Cargo.toml index 38aca42b1..ad4ccc008 100644 --- a/acceptance/Cargo.toml +++ b/acceptance/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true repository.workspace = true readme.workspace = true version.workspace = true +rust-version.workspace = true [dependencies] arrow-array = { workspace = true } diff --git a/derive-macros/Cargo.toml b/derive-macros/Cargo.toml index 05e8de4a7..5a50b891c 100644 --- a/derive-macros/Cargo.toml +++ b/derive-macros/Cargo.toml @@ -8,6 +8,7 @@ license.workspace = true repository.workspace = true readme.workspace = true version.workspace = true +rust-version.workspace = true [lib] proc-macro = true @@ -16,5 +17,3 @@ proc-macro = true proc-macro2 = "1" syn = { version = "2.0", features = ["extra-traits"] } quote = "1.0" - - diff --git a/ffi-proc-macros/Cargo.toml b/ffi-proc-macros/Cargo.toml index dfae2e243..ce8f1936b 100644 --- a/ffi-proc-macros/Cargo.toml +++ b/ffi-proc-macros/Cargo.toml @@ -7,6 +7,7 @@ keywords.workspace = true license.workspace = true repository.workspace = true readme.workspace = true +rust-version.workspace = true version.workspace = true [lib] @@ -14,5 +15,5 @@ proc-macro = true [dependencies] proc-macro2 = "1" -syn = { version = "2.0", features = ["extra-traits"] } +syn = { version = "2.0", features = ["extra-traits", "full"] } quote = "1.0" diff --git a/ffi/Cargo.toml b/ffi/Cargo.toml index 1bd69e708..30db5eb9a 100644 --- a/ffi/Cargo.toml +++ b/ffi/Cargo.toml @@ -7,6 +7,7 @@ license.workspace = true repository.workspace = true readme.workspace = true version.workspace = true +rust-version.workspace = true build = "build.rs" [lib] diff --git a/kernel/Cargo.toml b/kernel/Cargo.toml index a4ba3ce70..d15b8e306 100644 --- a/kernel/Cargo.toml +++ b/kernel/Cargo.toml @@ -10,6 +10,7 @@ readme.workspace = true version.workspace = true # exclude golden tests + golden test data since they push us over 10MB crate size limit exclude = ["tests/golden_tables.rs", "tests/golden_data/" ] +rust-version.workspace = true [package.metadata.docs.rs] all-features = true