-
Notifications
You must be signed in to change notification settings - Fork 1
Update getrandom version in text_fixtures crate
#422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughUpdated the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
crates/test_fixtures/Cargo.toml(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-06-09T07:46:10.639Z
Learnt from: 0xgleb
Repo: rainlanguage/rain.interpreter PR: 333
File: Cargo.toml:11-11
Timestamp: 2025-06-09T07:46:10.639Z
Learning: When analyzing dependency upgrades in Rust projects, always search for the specific programming language and context (e.g., "Rust alloy crate" vs "Alloy framework") to avoid confusion between different libraries with the same name. The alloy crate in Rust is for Ethereum development, not mobile app development.
Applied to files:
crates/test_fixtures/Cargo.toml
📚 Learning: 2025-06-09T07:46:10.639Z
Learnt from: 0xgleb
Repo: rainlanguage/rain.interpreter PR: 333
File: Cargo.toml:11-11
Timestamp: 2025-06-09T07:46:10.639Z
Learning: When analyzing dependency upgrades, always search for the specific programming language and context (e.g., "Rust alloy crate" vs "Alloy framework") to avoid confusion between different libraries with the same name. The alloy crate in Rust is for Ethereum development, not mobile app development.
Applied to files:
crates/test_fixtures/Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (10)
- GitHub Check: rainix (ubuntu-latest, test-wasm-build)
- GitHub Check: rainix (ubuntu-latest, rainix-sol-artifacts)
- GitHub Check: rainix (ubuntu-latest, rainix-rs-static)
- GitHub Check: rainix (ubuntu-latest, rainix-sol-test)
- GitHub Check: rainix (macos-latest, rainix-rs-test)
- GitHub Check: rainix (ubuntu-latest, rainix-rs-test)
- GitHub Check: rainix (macos-latest, rainix-rs-artifacts)
- GitHub Check: rainix (ubuntu-latest, rainix-sol-static)
- GitHub Check: rainix (ubuntu-latest, rainix-rs-artifacts)
- GitHub Check: git-clean
| [target.'cfg(target_family = "wasm")'.dependencies] | ||
| getrandom = { version = "0", features = ["js", "js-sys"] } | ||
| getrandom = { version = "0.2", features = ["js", "js-sys"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
getrandom 0.2 breaking changes vs 0.1
💡 Result:
Summary of breaking changes when moving getrandom 0.1 → 0.2
- New optional Cargo features added: "rdrand", "js" (replaces stdweb/wasm-bindgen), and "custom". [1]
- Unsupported targets now fail to compile (previously panicked at runtime); you must opt into a fallback via the "custom" feature if needed. [1]
- Error API changes: some Error constants changed. [1]
- std trait impls are now conditional: impls for std-only traits are provided only when the "std" feature is enabled. [1]
- Several platform supports removed/changed: Hermit, L4Re and UEFI are no longer officially supported; Windows XP and stdweb support dropped in later 0.2.x; minimum Linux kernel bumped to 2.6.32. [1][2]
- MSRV (minimum supported Rust version) bumped (0.2.0 → Rust 1.34; later 0.2.x bumped further in subsequent 0.2 releases). [1][2]
Sources:
[1] getrandom CHANGELOG (0.2.0). [2] Rust rand book notes on updating to getrandom 0.2 / related 0.2.x remarks.
🏁 Script executed:
# Check if tests exist for test_fixtures crate
fd -t f "\.rs$" crates/test_fixtures --exec grep -l "getrandom\|wasm" {} \;Repository: rainlanguage/rain.interpreter
Length of output: 55
🏁 Script executed:
# Verify Rust version constraint semantics
# According to Cargo semver, "0.2" should match >=0.2.0, <0.3.0
# Let's check if there's a Cargo.lock or documentation about the resolved version
cd crates/test_fixtures && find . -name "Cargo.lock" -o -name "*.md" | head -20Repository: rainlanguage/rain.interpreter
Length of output: 55
Confirm getrandom 0.2 migration and version strategy for WASM target.
The version constraint change from "0" to "0.2" represents a significant migration: the "js" feature used by this crate is new in getrandom 0.2 and replaces the older stdweb/wasm-bindgen approach. Getrandom 0.1 to 0.2 includes breaking changes (new feature structure, compile-time vs runtime error handling, std trait conditionals, platform support changes, and MSRV bumps).
For clarity and maintainability:
- Consider specifying the minimum required version more explicitly. If 0.2.0 is the oldest compatible 0.2.x release, document this rationale. If a specific 0.2.z patch is required, consider pinning to that version.
- Confirm this change has been tested to ensure compatibility with the new "js" and "js-sys" features in getrandom 0.2.
- Add a brief comment in Cargo.toml explaining why 0.2 is required (e.g., "0.2 required for new 'js' feature for WASM support").
|
Closing this as we have #424 |
Motivation
There was an issue with updating some of the dependencies in orderbook repository that required us to use a different version of get random in this repository. This PR is created to update
getrandomdependency.Solution
Checks
By submitting this for review, I'm confirming I've done the following:
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.