Skip to content

build(deps): update rand requirement from 0.8 to 0.10 in /src-tauri#83

Open
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/cargo/src-tauri/rand-0.10
Open

build(deps): update rand requirement from 0.8 to 0.10 in /src-tauri#83
dependabot[bot] wants to merge 1 commit intomainfrom
dependabot/cargo/src-tauri/rand-0.10

Conversation

@dependabot
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Feb 25, 2026

Updates the requirements on rand to permit the latest version.

Changelog

Sourced from rand's changelog.

[0.10.0] - 2026-02-08

Changes

  • The dependency on rand_chacha has been replaced with a dependency on chacha20. This changes the implementation behind StdRng, but the output remains the same. There may be some API breakage when using the ChaCha-types directly as these are now the ones in chacha20 instead of rand_chacha (#1642).
  • Rename fns IndexedRandom::choose_multiple -> sample, choose_multiple_array -> sample_array, choose_multiple_weighted -> sample_weighted, struct SliceChooseIter -> IndexedSamples and fns IteratorRandom::choose_multiple -> sample, choose_multiple_fill -> sample_fill (#1632)
  • Use Edition 2024 and MSRV 1.85 (#1653)
  • Let Fill be implemented for element types, not sliceable types (#1652)
  • Fix OsError::raw_os_error on UEFI targets by returning Option<usize> (#1665)
  • Replace fn TryRngCore::read_adapter(..) -> RngReadAdapter with simpler struct RngReader (#1669)
  • Remove fns SeedableRng::from_os_rng, try_from_os_rng (#1674)
  • Remove Clone support for StdRng, ReseedingRng (#1677)
  • Use postcard instead of bincode to test the serde feature (#1693)
  • Avoid excessive allocation in IteratorRandom::sample when amount is much larger than iterator size (#1695)
  • Rename os_rng -> sys_rng, OsRng -> SysRng, OsError -> SysError (#1697)
  • Rename Rng -> RngExt as upstream rand_core has renamed RngCore -> Rng (#1717)

Additions

  • Add fns IndexedRandom::choose_iter, choose_weighted_iter (#1632)
  • Pub export Xoshiro128PlusPlus, Xoshiro256PlusPlus prngs (#1649)
  • Pub export ChaCha8Rng, ChaCha12Rng, ChaCha20Rng behind chacha feature (#1659)
  • Fn rand::make_rng() -> R where R: SeedableRng (#1734)

Removals

  • Removed ReseedingRng (#1722)
  • Removed unused feature "nightly" (#1732)
  • Removed feature small_rng (#1732)

#1632: rust-random/rand#1632 #1642: rust-random/rand#1642 #1649: rust-random/rand#1649 #1652: rust-random/rand#1652 #1653: rust-random/rand#1653 #1659: rust-random/rand#1659 #1665: rust-random/rand#1665 #1669: rust-random/rand#1669 #1674: rust-random/rand#1674 #1677: rust-random/rand#1677 #1693: rust-random/rand#1693 #1695: rust-random/rand#1695 #1697: rust-random/rand#1697 #1717: rust-random/rand#1717 #1722: rust-random/rand#1722 #1732: rust-random/rand#1732 #1734: rust-random/rand#1734

[0.9.2] - 2025-07-20

Deprecated

  • Deprecate rand::rngs::mock module and StepRng generator (#1634)

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](rust-random/rand@0.8.0...0.10.0)

---
updated-dependencies:
- dependency-name: rand
  dependency-version: 0.10.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Feb 25, 2026
@dependabot dependabot bot requested a review from Miyamura80 as a code owner February 25, 2026 10:58
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Feb 25, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 25, 2026

Greptile Summary

This Dependabot PR bumps the rand crate from 0.8 to 0.10 in src-tauri/Cargo.toml. However, rand 0.10 is a major version with significant breaking API changes, and the existing usage in src-tauri/src/logging.rs was not updated to match.

  • Build breakage: rand::thread_rng, rand::Rng, and rand::distributions::Alphanumeric are all removed or renamed in rand 0.10. The project will fail to compile as-is.
  • Required code changes: src-tauri/src/logging.rs needs to be updated to use rand::rng(), rand::RngExt (or the re-exported Rng), and rand::distr::Alphanumeric.
  • Cargo.lock not updated: The lockfile still references rand 0.8.5/0.9.2 and does not include 0.10, confirming this change hasn't been tested against the actual dependency resolution.

Confidence Score: 1/5

  • This PR will cause a compilation failure due to unaddressed breaking API changes in rand 0.10.
  • Score of 1 reflects that while the intent (updating a dependency) is correct, the PR only bumps the version in Cargo.toml without updating the consuming code in src-tauri/src/logging.rs. The project will not compile, as rand 0.10 removed/renamed thread_rng, the Rng trait, and the distributions module path. This is expected behavior from Dependabot (it only updates the manifest), but the PR requires manual code changes before it can be merged.
  • src-tauri/src/logging.rs uses removed/renamed rand 0.8 APIs (thread_rng, Rng, distributions::Alphanumeric) that must be updated for rand 0.10 compatibility.

Important Files Changed

Filename Overview
src-tauri/Cargo.toml Bumps rand from 0.8 to 0.10 but does not update the breaking API usages in src-tauri/src/logging.rs (thread_rng, Rng trait, distributions::Alphanumeric). Will fail to compile.

Last reviewed commit: 9663d43

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

tracing-subscriber = { version = "0.3", features = ["env-filter"] }
regex = "1.12"
rand = "0.8"
rand = "0.10"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaking API changes not addressed

Bumping rand from 0.8 to 0.10 is a major version change with several breaking API changes, and the existing code in src-tauri/src/logging.rs:11-17 uses APIs that were removed or renamed in 0.10:

  1. rand::thread_rng no longer exists — replaced with rand::rng() (returns ThreadRng directly instead of wrapping it).
  2. rand::Rng trait was renamed to rand::RngExt (since rand_core::RngCore was renamed to rand_core::Rng).
  3. rand::distributions::Alphanumeric moved to rand::distr::Alphanumeric.

The current code:

use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
thread_rng()
    .sample_iter(&Alphanumeric)
    .take(8)
    .map(char::from)
    .collect()

Would need to become something like:

use rand::distr::Alphanumeric;
use rand::Rng;
rand::rng()
    .sample_iter(Alphanumeric)
    .take(8)
    .map(char::from)
    .collect()

This PR will fail to compile without updating the consuming code.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src-tauri/Cargo.toml
Line: 33

Comment:
**Breaking API changes not addressed**

Bumping `rand` from 0.8 to 0.10 is a major version change with several breaking API changes, and the existing code in `src-tauri/src/logging.rs:11-17` uses APIs that were removed or renamed in 0.10:

1. `rand::thread_rng` no longer exists — replaced with `rand::rng()` (returns `ThreadRng` directly instead of wrapping it).
2. `rand::Rng` trait was renamed to `rand::RngExt` (since `rand_core::RngCore` was renamed to `rand_core::Rng`).
3. `rand::distributions::Alphanumeric` moved to `rand::distr::Alphanumeric`.

The current code:
```rust
use rand::distributions::Alphanumeric;
use rand::{thread_rng, Rng};
thread_rng()
    .sample_iter(&Alphanumeric)
    .take(8)
    .map(char::from)
    .collect()
```

Would need to become something like:
```rust
use rand::distr::Alphanumeric;
use rand::Rng;
rand::rng()
    .sample_iter(Alphanumeric)
    .take(8)
    .map(char::from)
    .collect()
```

This PR will fail to compile without updating the consuming code.

How can I resolve this? If you propose a fix, please make it concise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants