Repository navigation
build!: vendor bincode 2.0.1 as GroveDB workspace crates - #940
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (77)
📝 WalkthroughWalkthroughAdds vendored bincode 2.0.1 runtime and derive crates. The change includes configurable encoding and decoding, feature-gated integrations, compatibility tests, benchmarks, documentation, and dedicated CI checks. ChangesVendored bincode integration
Estimated code review effort: 5 (Critical) | ~120 minutes Sequence Diagram(s)sequenceDiagram
participant Caller
participant grovedb_bincode
participant EncoderDecoder
participant ReaderWriter
Caller->>grovedb_bincode: encode or decode value with Configuration
grovedb_bincode->>EncoderDecoder: construct EncoderImpl or DecoderImpl
EncoderDecoder->>ReaderWriter: write or read encoded bytes
ReaderWriter-->>EncoderDecoder: bytes and errors
EncoderDecoder-->>Caller: encoded output or decoded value
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #940 +/- ##
========================================
Coverage 92.90% 92.90%
========================================
Files 325 325
Lines 102938 102938
========================================
Hits 95633 95633
Misses 7305 7305
🚀 New features to boost your workflow:
|
Issue being fixed or feature implemented
GroveDB currently depends on the unmaintained bincode 2.0.1 release. Bring that exact release into the workspace as
grovedb-bincodeandgrovedb-bincode-deriveso future maintenance can happen in this repository.This is an import and dependency migration only. Encoder, decoder, derive behavior, wire format, and resource limits remain those of upstream 2.0.1. Decoder hardening discussed in #938 remains separate.
What was done?
GROVEDB.md.bincodeandbincode_derivelibrary names and workspace dependency aliases, so existing GroveDB imports and derive paths continue to work.untyandvirtue). Upstream bincode 2.0.1 is used only as a development dependency for a new compatibility test; upstream 1.3 remains in the imported upstream test dependencies.Bincodejob runs their upstream/compatibility tests, lint, formatting, and no-std feature checks only when files in either imported crate directory change. GroveDB integration tests still compile and exercise the fork as a dependency.How Has This Been Tested?
Passed locally:
cargo test --workspace --all-features— 5,858 passed, 14 ignored, no failures, including doctests.cargo test -p grovedb-bincode -p grovedb-bincode-derive --all-featurescargo clippy --workspace --all-features -- -D warningscargo clippy -p grovedb-bincode -p grovedb-bincode-derive --all-features --all-targets -- -D warningscargo check --workspace --all-features --all-targetscargo build --no-default-features --features verify -p grovedballoc,derive, andalloc,serde.cargo fmt --all --checkand pre-commit hooks.actionlint. Its regular workspace formatting, lint, and all-target build commands pass with the imported packages excluded. Nextest lists 5,755 tests in 31 suites with no imported bincode suites; every command in the separateBincodejob passes locally.An additional
cargo clippy --workspace --all-features --all-targets -- -D warningsrun reports an existingclone_on_copyin unchangedgrovedb-commitment-tree/src/client/sqlite_client_tests.rs:544. The standard CI lint command above passes. No unrelated test cleanup is included.Breaking Changes
The Cargo package identities change, so the fork's
Encode/Decodetraits are distinct from upstream bincode's traits. Downstream applications using these traits with GroveDB types must use the fork, typically throughbincode = { package = "grovedb-bincode", version = "=2.0.1" }. Encoded database and proof bytes are unchanged.The derive package must be published before the runtime package, and both must be published before dependent GroveDB releases. This PR does not publish crates.
Checklist
Summary by CodeRabbit
New Features
no_std, allocation, standard library, derive, and Serde integrations.Encode,Decode, andBorrowDecode, including generic and enum support.Documentation
Tests