Skip to content

build(deps): update rand to version 0.10#311

Open
jtojnar wants to merge 1 commit into
camshaft:masterfrom
jtojnar:rand10
Open

build(deps): update rand to version 0.10#311
jtojnar wants to merge 1 commit into
camshaft:masterfrom
jtojnar:rand10

Conversation

@jtojnar
Copy link
Copy Markdown
Contributor

@jtojnar jtojnar commented Apr 12, 2026

https://github.com/rust-random/rand/releases/tag/0.10.0

Notable changes:

  • Renamed *RngCore in rand_core to *Rng
  • Renamed *Rng in rand to *RngExt
  • Moved rand_core::OsRng to rand and renamed to SysRng
  • Dropped from_os_rng constructor.

https://github.com/rust-random/rand/releases/tag/0.10.0

Notable changes:

- Renamed `*RngCore` in `rand_core` to `*Rng`
- Renamed `*Rng` in `rand` to `*RngExt`
- Moved `rand_core::OsRng` to `rand` and renamed to `SysRng`
- Dropped `from_os_rng` constructor.
@jtojnar
Copy link
Copy Markdown
Contributor Author

jtojnar commented Apr 12, 2026

Hmm, it is not clear to me why it fails in CI with:

error: failed to select a version for `rand`.
    ... required by package `bolero v0.13.4 (/home/runner/work/bolero/bolero/lib/bolero)`
versions that meet the requirements `^0.10` are: 0.10.1, 0.10.0

the package `bolero` depends on `rand`, with features: `getrandom` but `rand` does not have these features.
 It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.


failed to select a version for `rand` which could resolve this conflict
Error: command exited with non-zero code `cargo test`: 101

It should be correct that there is no getrandom feature since that dependency is subsumed by std_rng feature:

https://github.com/rust-random/rand/blob/0.10.1/Cargo.toml#L42

And I do not see anything trying to enable rand/getrandom in bolero.

It appears to work locally.

@jtojnar
Copy link
Copy Markdown
Contributor Author

jtojnar commented Apr 12, 2026

I can reproduce locally if I lower the Rust version to 1.68.0.

Though the only thing that could possibly cause this could be getrandom?/std feature dependency in https://github.com/rust-random/rand/blob/0.10.1/Cargo.toml#L36 being parsed as getrandom. But weak dependency features are supposed to be stable since Rust 1.60.

If I use rand 0.10 with default-features = false, it fails with a different error, hinting that the bump might not be possible until we increase MSRV to 1.85.0, which introduced the 2024 edition:

error: failed to parse manifest at `/home/jtojnar/.local/share/cargo/registry/src/github.com-1ecc6299db9ec823/rand_core-0.10.0/Cargo.toml`

Caused by:
  failed to parse the `edition` key

Caused by:
  this version of Cargo is older than the `2024` edition, and only supports `2015`, `2018`, and `2021` editions.
Error: command exited with non-zero code `cargo test`: 101

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants