Skip to content

Commit

Permalink
proj: update MSRV to 1.63, commit lockfile
Browse files Browse the repository at this point in the history
This matches the other Rusticata crates and fixes a build error with
1.60 from `memchr` requiring 1.61+

Note: we have two transitive dependencies that have bumped their MSRV
within otherwise semver compatible versions:

* `winnow` 0.4.2+ requires an MSRV of 1.64.0[0]
* `toml_edit` 0.19.9+ requires an MSRV of 1.64.0[1]

Recently the Rust project guidance on commiting lockfiles for library
projects[2] was changed. They say:

"A lockfile is an appropriate way to pin versions for your project so
you can validate your MSRV"

As a result I've opted to commit a lockfile and use `--locked` in CI to
maintain MSRV. I think this is a better approach than manually working
around the issue with `cargo update --precise` and in line with current
best practices.

[0]: https://github.com/winnow-rs/winnow/blob/v0.6.6/CHANGELOG.md#042---2023-04-28
[1]: https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md#0199---2023-05-18
[2]: https://blog.rust-lang.org/2023/08/29/committing-lockfiles.html
  • Loading branch information
cpu authored and chifflier committed Apr 20, 2024
1 parent 362d227 commit 94c1e2d
Show file tree
Hide file tree
Showing 5 changed files with 616 additions and 11 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,14 @@ jobs:
matrix:
rust:
- stable
- 1.60.0
- 1.63.0
- nightly
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Cargo update
run: cargo update
- run: RUSTFLAGS="-D warnings" cargo check
- run: RUSTFLAGS="-D warnings" cargo check --locked

test_features:
name: Test suite (with features)
Expand All @@ -40,15 +38,15 @@ jobs:
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- run: cargo test ${{ matrix.features }}
- run: cargo test --locked ${{ matrix.features }}

no_std:
name: no-std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: RUSTFLAGS="-D warnings" cargo check --no-default-features
- run: RUSTFLAGS="-D warnings" cargo check --locked --no-default-features

fmt:
name: Rustfmt
Expand All @@ -68,7 +66,7 @@ jobs:
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- run: cargo clippy -- -D warnings
- run: cargo clippy --locked -- -D warnings

doc:
name: Build documentation
Expand All @@ -78,7 +76,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: cargo doc --workspace --no-deps --all-features
- run: cargo doc --workspace --no-deps --locked --all-features

semver:
name: Check semver compatibility
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.*.swp
target
Cargo.lock
/.idea
Loading

0 comments on commit 94c1e2d

Please sign in to comment.