chore: bump rand to 0.10.0#103
Conversation
Signed-off-by: jl.jiang <jiangjl9807@gmail.com>
|
Claude finished @jjl9807's task in 3m 8s —— View job Code Review: chore: bump rand to 0.10.0
SummaryThis PR bumps Issues Found1. Unnecessary Direct
|
There was a problem hiding this comment.
Pull request overview
This PR upgrades the rand crate from version 0.9.2 to 0.10.0 and the futures crate family from 0.3.31 to 0.3.32. The upgrade removes the older rand_chacha dependency and introduces chacha20 0.10.0 along with several supporting cryptographic crates. However, there is a critical issue with the source code migration that will prevent the code from compiling.
Changes:
- Upgrades rand from 0.9.2 to 0.10.0, replacing rand_chacha with chacha20
- Upgrades futures ecosystem from 0.3.31 to 0.3.32 across all crates
- Removes pin-utils dependency from futures-util
- Adds new cryptographic dependencies: chacha20, cipher, block-buffer, hybrid-array, inout, crypto-common, and cpufeatures 0.3.0
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/zstdelta/mod.rs | Updates test code to use chacha20::ChaCha20Rng instead of rand_chacha::ChaChaRng (CRITICAL BUG: this type doesn't exist) |
| Cargo.toml | Updates rand to 0.10.0, replaces rand_chacha with chacha20 in dev-dependencies, updates futures to 0.3.32 |
| Cargo.lock | Reflects all dependency version changes and additions/removals |
| BUCK | Updates futures dependency paths to 0.3.32 versions |
| buckal.snap | Updates fingerprints for all changed dependencies |
| third-party/rust/crates/*/BUCK | Updates Buck build definitions for futures 0.3.32, rand 0.10.0, removes old rand/rand_chacha/rand_core versions, adds new crypto crates |
Comments suppressed due to low confidence (1)
Cargo.toml:66
- The PR title "chore: bump rand to 0.10.0" doesn't fully capture the scope of changes. This PR also upgrades the futures crate family from 0.3.31 to 0.3.32, removes rand 0.9.2/rand_chacha 0.9.0/rand_core 0.9.3, and adds several new dependencies (chacha20, cipher, block-buffer, hybrid-array, inout, crypto-common, cpufeatures). Consider updating the PR title to reflect the broader dependency updates, such as "chore: bump rand to 0.10.0 and futures to 0.3.32".
rand = "0.10.0"
chacha20 = "0.10.0"
|
|
||
| #[cfg(test)] | ||
| mod tests { | ||
| use chacha20::ChaCha20Rng; |
There was a problem hiding this comment.
The chacha20 crate (version 0.10.0) is a cryptographic cipher library, not an RNG library. The type ChaCha20Rng does not exist in the chacha20 crate.
For rand 0.10.0, the correct import should be either:
use rand::rngs::ChaCha20Rng;if rand 0.10.0 re-exports it, or- Keep using
rand_chachacrate (with an updated version compatible with rand 0.10.0)
The chacha20 crate provides the ChaCha20 stream cipher for encryption/decryption, not random number generation. This will cause a compilation error.
| use chacha20::ChaCha20Rng; | |
| use rand_chacha::ChaCha20Rng; |
Signed-off-by: jl.jiang <jiangjl9807@gmail.com>
No description provided.