From 184dca47e7ff41f82f0e0e8bb805f320dfb038e2 Mon Sep 17 00:00:00 2001 From: Emmanuel Thompson Date: Wed, 22 May 2024 11:16:05 -0400 Subject: [PATCH] Update deps (#438) * update dependencies * update msrv * fmt * cortex-m-rt 0.7.4 was yanked * cleanup actions * Update CHANGELOG and README for MSRV change --- .github/workflows/coverage.yml | 12 ++++++++---- .github/workflows/main.yml | 22 +++++++++++----------- .github/workflows/pull_request.yml | 6 +++--- CHANGELOG.md | 2 +- Cargo.toml | 18 +++++++++--------- README.md | 2 +- deku-derive/Cargo.toml | 6 +++--- deku-derive/src/lib.rs | 6 ++++-- ensure_no_std/Cargo.toml | 2 +- ensure_wasm/Cargo.toml | 2 +- 10 files changed, 42 insertions(+), 36 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0a2c3f27..099071ac 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,18 +8,22 @@ jobs: env: CARGO_TERM_COLOR: always steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable + - name: Install cargo-llvm-cov - uses: taiki-e/install-action@e8c64729e2a2a2c3cfa6751fa496b34ca19f390c # cargo-llvm-cov + uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov - name: Generate code coverage run: cargo llvm-cov --workspace --codecov --output-path codecov.json - name: Upload coverage to Codecov - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 + uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} files: codecov.json fail_ci_if_error: true diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6bf79de3..4e3fd019 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,8 +11,8 @@ jobs: - stable steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -30,11 +30,11 @@ jobs: matrix: toolchain: # msrv - - 1.67.1 + - 1.71 steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} @@ -44,8 +44,8 @@ jobs: fmt-clippy-check: runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: stable @@ -56,8 +56,8 @@ jobs: name: Ensure no_std runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: nightly targets: thumbv7em-none-eabihf @@ -67,8 +67,8 @@ jobs: name: Ensure wasm runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master with: toolchain: nightly - uses: jetli/wasm-pack-action@v0.3.0 diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 7ed5ac8d..63b0e711 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -5,13 +5,13 @@ jobs: name: Benchmark runs-on: ubuntu-latest steps: - - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + - uses: actions/checkout@v4 with: fetch-depth: 0 - - uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248 # master + - uses: dtolnay/rust-toolchain@master with: toolchain: stable - - uses: boa-dev/criterion-compare-action@adfd3a94634fe2041ce5613eb7df09d247555b87 # v3.2.4 + - uses: boa-dev/criterion-compare-action@v3 with: branchName: ${{ github.base_ref }} token: ${{ secrets.GITHUB_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f38406f..e3204c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,10 +3,10 @@ ## [Unreleased] ## Changes +- Bumped MSRV to `1.71` ([#438](https://github.com/sharksforarms/deku/pull/438)) - Add DekuWrite impl for `[T]` ([#416](https://github.com/sharksforarms/deku/pull/416)) - Add `no-assert-string` feature to remove panic string on failed assertion ([#405](https://github.com/sharksforarms/deku/pull/405)) - Add `read_all` attribute to read until `reader.end()` ([#387](https://github.com/sharksforarms/deku/pull/387)) -- Added MSRV for `1.67.1` ([#390](https://github.com/sharksforarms/deku/pull/390)) - Changed edition to 2021 ([#389](https://github.com/sharksforarms/deku/pull/389)) - Refactored `logging` feature with massive usability increases ([#352](https://github.com/sharksforarms/deku/pull/352)), ([#355](https://github.com/sharksforarms/deku/pull/355)) - Bumped the `syn` library to 2.0, which required replacing `type` for Enums with `id_type` ([#386](https://github.com/sharksforarms/deku/pull/386)) diff --git a/Cargo.toml b/Cargo.toml index ae7cc562..b9986e27 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ keywords = ["deku", "bits", "serialization", "deserialization", "struct"] categories = ["encoding", "parsing", "no-std"] description = "bit level serialization/deserialization proc-macro for structs" readme = "README.md" -rust-version = "1.67.1" +rust-version = "1.71" [lib] bench = false @@ -29,19 +29,19 @@ no-assert-string = ["deku_derive/no-assert-string"] [dependencies] deku_derive = { version = "^0.16.0", path = "deku-derive", default-features = false} bitvec = { version = "1.0.1", default-features = false } -log = { version = "0.4.17", optional = true } -no_std_io = { version = "0.5.0", default-features = false, features = ["alloc"] } -rustversion = "1.0.15" +log = { version = "0.4.21", optional = true } +no_std_io = { version = "0.6.0", default-features = false, features = ["alloc"] } +rustversion = "1.0.16" [dev-dependencies] -rstest = "0.18.0" +rstest = "0.19.0" hexlit = "0.5.5" -criterion = "0.4.0" +criterion = "0.5.1" alloc_counter = "0.0.4" -trybuild = "1.0.77" +trybuild = "1.0.95" rustc-hash = "1.1.0" -env_logger = "0.10.0" -assert_hex = "0.2.2" +env_logger = "0.11.3" +assert_hex = "0.4.1" [[bench]] name = "deku" diff --git a/README.md b/README.md index e8dd4fb4..2a43eacc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Avoid the requirement of writing redundant, error-prone parsing and writing code for binary structs or network headers ## Usage -*Compiler support: requires rustc 1.67.1+* +*Compiler support: requires rustc 1.71+* ```toml [dependencies] diff --git a/deku-derive/Cargo.toml b/deku-derive/Cargo.toml index 010ff133..e4bf4b8b 100644 --- a/deku-derive/Cargo.toml +++ b/deku-derive/Cargo.toml @@ -7,7 +7,7 @@ license = "MIT OR Apache-2.0" repository = "https://github.com/sharksforarms/deku" description = "bit level serialization/deserialization proc-macro for structs" readme = "../README.md" -rust-version = "1.67.1" +rust-version = "1.71" [lib] proc-macro = true @@ -24,7 +24,7 @@ syn = "2.0" # syn = {version = "1.0", features = ["extra-traits"]} proc-macro2 = "1.0" darling = "0.20" -proc-macro-crate = { version = "1.3.0", optional = true } +proc-macro-crate = { version = "3.1.0", optional = true } [dev-dependencies] -rstest = "0.18" +rstest = "0.19" diff --git a/deku-derive/src/lib.rs b/deku-derive/src/lib.rs index 3442a6f1..83470752 100644 --- a/deku-derive/src/lib.rs +++ b/deku-derive/src/lib.rs @@ -269,12 +269,14 @@ impl DekuData { /// Emit a reader. On error, a compiler error is emitted fn emit_reader(&self) -> TokenStream { - self.emit_reader_checked().unwrap_or_else(|e| e.to_compile_error()) + self.emit_reader_checked() + .unwrap_or_else(|e| e.to_compile_error()) } /// Emit a writer. On error, a compiler error is emitted fn emit_writer(&self) -> TokenStream { - self.emit_writer_checked().unwrap_or_else(|e| e.to_compile_error()) + self.emit_writer_checked() + .unwrap_or_else(|e| e.to_compile_error()) } /// Same as `emit_reader`, but won't auto convert error to compile error diff --git a/ensure_no_std/Cargo.toml b/ensure_no_std/Cargo.toml index f3799d4a..f5d70c5a 100644 --- a/ensure_no_std/Cargo.toml +++ b/ensure_no_std/Cargo.toml @@ -21,5 +21,5 @@ alloc = [] [dependencies] cortex-m-rt = "0.7.3" deku = { path = "../", default-features = false, features = ["alloc"] } -embedded-alloc = "0.5.0" +embedded-alloc = "0.5.1" diff --git a/ensure_wasm/Cargo.toml b/ensure_wasm/Cargo.toml index 9e231466..f800bebf 100644 --- a/ensure_wasm/Cargo.toml +++ b/ensure_wasm/Cargo.toml @@ -13,7 +13,7 @@ crate-type = ["cdylib", "rlib"] default = ["console_error_panic_hook", "wee_alloc"] [dependencies] -wasm-bindgen = "0.2.73" +wasm-bindgen = "0.2.92" # The `console_error_panic_hook` crate provides better debugging of panics by # logging them with `console.error`. This is great for development, but requires