Skip to content

Commit

Permalink
Fix minimum dependency versions and features and check them in CI (#557)
Browse files Browse the repository at this point in the history
* Fix minimum dependency versions and features and check them in CI

* Update CHANGELOG

* Enable std feature for serde_json

* Auto-fix clippy lints in the fuzzer
  • Loading branch information
juntyr authored Jan 27, 2025
1 parent 7466647 commit ddf47f3
Show file tree
Hide file tree
Showing 5 changed files with 122 additions and 81 deletions.
38 changes: 37 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,55 @@ on:
- cron: '0 0 * * 0'

jobs:
lock:
name: Cargo.lock
runs-on: ubuntu-latest
steps:
- name: Checkout the Repository
uses: actions/checkout@v3
- name: Install the Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Generate the minimum version lockfile
run: |
cargo update -Z minimal-versions
cargo update -Z direct-minimal-versions
mv Cargo.lock Cargo.lock.min
- name: Generate the current version lockfile
run: cargo update
- name: Upload the Cargo lockfiles
uses: actions/upload-artifact@v4
with:
name: Cargo.lock
path: |
Cargo.lock
Cargo.lock.min
tests:
name: Tests
runs-on: ubuntu-latest
needs: lock

strategy:
matrix:
rust: [1.64.0, stable, nightly]
lock: ["Cargo.lock", "Cargo.lock.min"]

steps:
- uses: actions/checkout@v3
- name: Download the Cargo lockfiles
uses: actions/download-artifact@v4
with:
name: Cargo.lock
- name: Rename ${{ matrix.lock }} to Cargo.lock
run: mv ${{ matrix.lock }} Cargo.lock
if: ${{ matrix.lock != 'Cargo.lock' }}
- uses: ./.github/actions/setup
with:
key: test-${{ matrix.rust }}
key: test-${{ matrix.rust }}-${{ matrix.lock }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

- Fix issue [#556](https://github.com/ron-rs/ron/issues/556) and update minium dependency versions ([#557](https://github.com/ron-rs/ron/pull/557))

## [0.9.0] - 2023-09-??

### API Changes
Expand Down
27 changes: 15 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,24 @@ integer128 = []

[dependencies]
# FIXME @juntyr remove base64 once old byte strings are fully deprecated
base64 = "0.22"
bitflags = { version = "2.0", features = ["serde"] }
indexmap = { version = "2.0", features = ["serde"], optional = true }
base64 = { version = "0.22", default-features = false, features = ["std"] }
bitflags = { version = "2.1", default-features = false, features = ["serde"] }
indexmap = { version = "2.0", default-features = false, features = ["std", "serde"], optional = true }
# serde supports i128/u128 from 1.0.60 onwards
serde = "1.0.60"
serde_derive = "1.0"
unicode-ident = "1.0"
# serde's IntoDeserializer impls suport new constructor from 1.0.139 onwards
# serde's adjacently tagged enums support integer tags from 1.0.181 onwards
serde = { version = "1.0.181", default-features = false, features = ["std"] }
serde_derive = { version = "1.0.181", default-features = false }
unicode-ident = { version = "1.0", default-features = false }

[dev-dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_bytes = "0.11"
serde_json = "1.0"
option_set = "0.2"
typetag = "0.2"
bytes = { version = "1.3", features = ["serde"] }
serde = { version = "1.0.181", default-features = false, features = ["std", "derive"] }
serde_bytes = { version = "0.11", default-features = false, features = ["std"] }
# serde_json supports the std feature from 1.0.60 onwards
serde_json = { version = "1.0.60", default-features = false, features = ["std"] }
option_set = { version = "0.2", default-features = false }
typetag = { version = "0.2", default-features = false }
bytes = { version = "1.3", default-features = false, features = ["serde"] }

[package.metadata.docs.rs]
features = ["integer128", "indexmap"]
Expand Down
Loading

0 comments on commit ddf47f3

Please sign in to comment.