From 800f9101032cdf804477ee29ec617af0710a4741 Mon Sep 17 00:00:00 2001 From: Connor Fitzgerald Date: Sun, 22 Aug 2021 17:28:28 -0400 Subject: [PATCH] Allow newer bitflags --- .github/workflows/pipeline.yml | 8 +++++++- Cargo.toml | 4 ++-- README.md | 12 ++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index bba081e5f2..dc9823869b 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [1.43.0, nightly] + rust: ["1.43.0", nightly] steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 @@ -16,6 +16,12 @@ jobs: profile: minimal toolchain: ${{ matrix.rust }} override: true + - uses: actions-rs/cargo@v1 + name: Downgrade bitflags to MSRV + if: ${{ matrix.rust }} == "1.43.0" + with: + command: update + args: -p bitflags --precise 1.2.1 - uses: actions-rs/cargo@v1 name: Default test with: diff --git a/Cargo.toml b/Cargo.toml index f72aa0ae61..92f911b71d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,8 @@ resolver = "2" all-features = true [dependencies] -# bitflags 1.3 requires Rust-1.46 -bitflags = "~1.2" +# MSRV warning: bitflags 1.3 requires Rust-1.46 +bitflags = "1" bit-set = "0.5" codespan-reporting = { version = "0.11.0", optional = true } fxhash = "0.2" diff --git a/README.md b/README.md index 13bd5afec2..b90bd9ee82 100644 --- a/README.md +++ b/README.md @@ -66,3 +66,15 @@ make validate-dot # for dot files, requires GraphViz installed make validate-wgsl # for WGSL shaders make validate-hlsl # for HLSL shaders. Note: this Make target makes use of the "sh" shell. This is not the default shell in Windows. ``` + +## MSRV + +The `naga` codebase's MSRV is 1.43. However some newer versions of our dependencies have newer MSRVs than that. Here are a list of all known MSRV breaking dependencies and the versions that hold to MSRV. + +- `bitflags`: `>1.3` have an MSRV of 1.46. `<=1.2` has an MSRV of 1.43 or earlier. + +If you want to use `naga` with `1.43` add the following to your Cargo.toml dependency list even if you don't use bitflags yourself: + +```toml +bitflags = "<1.3" +```