chore(deps): bump rand to 0.10 with RngExt fix - #39
Merged
Conversation
rand 0.10 splits the Rng trait: range/fill helper methods (random_range, random, etc.) move from Rng into a new RngExt trait. quantwave-backtest calls those helpers via tpe.rs and its test module in lib.rs, so the crate no longer compiles against 0.10 without importing RngExt. This bump and the RngExt import fix must land in a single commit: 0.9 does not have rand::RngExt, so a commit that adds the import before the bump does not compile, and a commit that bumps before the import does not compile either. Squashing avoids leaving a broken bisect point. Supersedes Dependabot PR #38, whose CI failure (E0599 on random_range/StdRng) was stale -- it ran against an older main that still pinned rand 0.8 and used gen_range, and never picked up this RngExt fix. The diff is exactly two lines, both `use rand::Rng` -> `use rand::RngExt`. Verified: cargo nextest run --workspace (1140 passed, 1 skipped, 0 failed). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lavs9
force-pushed
the
mm67-rand-0.10-bump
branch
from
August 11, 2026 04:10
9146dee to
bec55f6
Compare
Owner
Author
|
Force-pushed a correction. The first push of this branch reused an older local WIP branch as its base and, in doing so, silently reverted two NaN-safety regression tests in
Those tests guard the in-fold TPE optimizer against selecting an undefined objective, and a dependency bump has no business touching them. They are restored. The diff against main is now exactly two lines, both Workspace tests: 1140 passed, 1 skipped, 0 failed (was 1138 before the restore -- the two-test delta is the tests coming back). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Supersedes #38 (Dependabot's
rand0.9 → 0.10 bump). Same version bump, plus the 2-line source fix it needs to actually compile, squashed into one atomic commit.Why #38's CI failure was stale
#38's CI run failed with
E0599: no method named random_range found for StdRnginquantwave-backtest/src/tpe.rs. That looked like a live defect, but it wasn't: the branch is several days old and its CI ran against an oldermainthat still pinnedrand = "0.8"and usedgen_range(the 0.8 API). Main has since moved and the failure no longer reflects currentmain's behavior against 0.10.Rebasing surfaces the real issue:
rand0.10 splits theRngtrait — range/fill helpers (random_range,random, etc.) move out ofRnginto a newRngExttrait.quantwave-backtestcalls those helpers (tpe.rs, and the test module inlib.rs), so the crate doesn't compile against 0.10 without also importingRngExt.Why the bump and the fix must be atomic
rand::RngExtdoes not exist in 0.9. A commit that adds theRngExtimport before bumping the dependency fails to compile (no such trait). A commit that bumps the dependency before adding the import also fails to compile (0.10 no longer exposes those methods onRng). Splitting them across two commits leaves a broken bisect point either way, so both changes land together here in a single commit.Changes
Cargo.toml:rand = "0.9"→rand = "0.10"Cargo.lock: dependency graph updated for the bump (also picks upthiserror2.0.18 → 2.0.19 as a transitive update)quantwave-backtest/src/tpe.rs:use rand::Rng→use rand::RngExtquantwave-backtest/src/lib.rs(test module):use rand::Rng→use rand::RngExtVerification
Ran locally before pushing:
cargo build --workspace: 0 errorscargo nextest run --workspace: 1138 passed, 1 skipped, 0 failedTest plan
cargo build --workspacesucceedscargo nextest run --workspace— 1138 passed, 1 skipped, 0 failed🤖 Generated with Claude Code