Conversation
|
@dhardy How do you prefer to handle these failures: Should I disable |
I think this could simply be solved by extending the example to use MyRng: # let _rng = MyRng::from_seed(Default::default()); |
|
Running The latter still fails; looks like |
e46d7cf to
6ce6455
Compare
That wasn't quite enough (rust complains about |
|
@dhardy The only test that fails is the 1.36 test. That fails because it is pulling in dependencies that 1.36 doesn't support: Do you have any suggestions on how to handle this? |
|
@nwalfield this is probably fixable using "cargo update --precise" (and a lot of patience) to find compatible versions of each dependency. If necessary we can raise the MSRV (or minimum tested version), but please try the above first. Edit: sorry, it's not quite that simple. The proper solution would be to copy what we do in v0.9: once you have found a suitable |
aafa4c5 to
e0b76b3
Compare
Fix the following error: ``` warning: unexpected `cfg` condition name: `doc_cfg` --> rand_core/src/lib.rs:38:13 | 38 | #![cfg_attr(doc_cfg, feature(doc_cfg))] | ^^^^^^^ ``` `doc_cfg` was used just to conditionally include the `doc_cfg` feature in docs.rs builds. That has since been standardized and changed to `docsrs`. Replace `doc_cfg` with `docsrs`. See https://docs.rs/about/builds#detecting-docsrs .
Use `#[cfg(not(feature = "std"))]` to check for `std`, not `#[cfg(not(std))]`.
Enable the `trusted_len` feature. Implementing `TrustLen` is now unsafe. Fix the implementation.
`rustc` complains that `error: struct MyRng is never constructed`. Construct it, and use it.
Implementations of `FloatAsSIMD` and `BoolAsSIMD` are only used if the `simd_support` feature is enabled. Instead of making their definition and several users conditional on `simd_support`, just suppress the unused warning.
Modern versions of `rustc` warn about some elided lifetimes:
```
warning: hiding a lifetime that's elided elsewhere is confusing
--> src/seq/mod.rs:115:27
|
115 | fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<Self, Self::Item>
| ^^^^^ the lifetime is elided here ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the same lifetime is hidden here
|
= help: the same lifetime is referred to in inconsistent ways, making the signature confusing
= note: `#[warn(mismatched_lifetime_syntaxes)]` on by default
help: use `'_` for type paths
|
115 | fn choose_multiple<R>(&self, rng: &mut R, amount: usize) -> SliceChooseIter<'_, Self, Self::Item>
| +++
```
Address the warnings.
Modern `rustc` doesn't know about the `asmjs` target. Drop it.
v1 of `actions/cache` has been deprecated.
`simd_support` is an experimental feature, which does not work any more. Drop it.
The cross build test checks that `Rand` can be cross built for mips. The Rust project no longer provides binaries for that target. Switch to arm, as on the `master` branch.
The latest versions of `ppv-lite86` and `libc` don't compile with `rustc` 1.36. When testing with `rustc` 1.36, use the last compatible version of the dependencies.
FWIW, it took 6 hours of patience :D |
|
@dhardy CI now passes, and I think I've addressed all of the comments. Please let me know if there is something else that I should do. Thanks! |
dhardy
left a comment
There was a problem hiding this comment.
That's more patience than I had expected. Thanks for the effort.
The release date is wrong, but I guess it doesn't really matter.
|
Published |
|
@dhardy, thanks specifically for reviewing this, and publishing a new version, but also for your work on |
This makes sure that the vulnerable `log` feature is unavailable. And as such the advisory suppression is removed. See: rust-random/rand#1772 Signed-off-by: Wiktor Kwapisiewicz <wiktor@metacode.biz>
Summary
This PR backports #1764 to version 0.8.5 of
rand.Motivation
There are still many packages that use
rand0.8. Leaf crates that depend on such packages are unable to address RUSTSEC-2026-0097 until their dependencies upgrade to a newer version ofrand, which is likely to take a long time, or the fix is backported to 0.8. This PR does the latter.Details
A request for a backport to 0.8 was raised in #1770 .
I work on Sequoia PGP. In Sequoia, we are currently stuck on an old version of Hickory as the latest version of Hickory dropped support for OpenSSL. We are currently looking for a solution to Hickory, but until then we have to live with Hickory and its dependencies, which include a dependency on
rand0.8.