From e43e9c0c9b12a27bf96be79dbc5982c33c50c952 Mon Sep 17 00:00:00 2001 From: Marijn Suijten Date: Sun, 27 Mar 2022 23:30:10 +0200 Subject: [PATCH] Set MSRV through `rust-version` in `Cargo.toml` and validate in CI (#604) [#590] introduced an unsuspecting MSRV bump. While we're pro-ba-bly fine having these at the benefit of better code (in this case more appropriate `const` annotations), they should at least be clear to us when merging through a CI failure (or up-front bump of this version in the CI script). At the same time setting [`rust-version` in `Cargo.toml`] provides a more helpful "requires newer rustc" error message (since Rust 1.56.0) instead of showing potentially tons of irrelevant compile errors in this crate to the user. [#590]: https://github.com/MaikKlein/ash/pull/590 [`rust-version` in `Cargo.toml`]: https://doc.rust-lang.org/cargo/reference/manifest.html?highlight=pack#the-rust-version-field --- .github/workflows/ci.yml | 11 +++++++++++ ash-window/Cargo.toml | 1 + ash/Cargo.toml | 1 + 3 files changed, 13 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bdc12e0b0..16d348ce0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,17 @@ jobs: command: check args: --workspace --all-targets --all-features + check_msrv: + name: Check MSRV (1.59.0) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: dtolnay/rust-toolchain@1.59.0 + - uses: actions-rs/cargo@v1 + with: + command: check + args: --workspace --all-targets --all-features + generated: name: Generated runs-on: ubuntu-latest diff --git a/ash-window/Cargo.toml b/ash-window/Cargo.toml index e88515ff1..7c4d45ff1 100644 --- a/ash-window/Cargo.toml +++ b/ash-window/Cargo.toml @@ -12,6 +12,7 @@ keywords = ["window", "ash", "graphics"] categories = ["game-engines", "graphics"] exclude = [".github/*"] workspace = ".." +rust-version = "1.59.0" [dependencies] ash = { path = "../ash", version = "0.37", default-features = false } diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 58a80e3a7..b60010263 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -9,6 +9,7 @@ readme = "../README.md" keywords = ["vulkan", "graphic"] documentation = "https://docs.rs/ash" edition = "2018" +rust-version = "1.59.0" [dependencies] libloading = { version = "0.7", optional = true }