smol-rs / fastrand

A simple and fast random number generator
Apache License 2.0
409 stars 35 forks source link

1.5.0 changes random values with seeds #20

Open rcoh opened 3 years ago

rcoh commented 3 years ago

I'm not sure if this is considered a breaking change, but all my tests started failing because my seeded generators started returning different values. I suspect this will also impact a lot of other folks.

What do you think about yanking 1.5 and releasing 2.0 instead with the new algorithm?

jbr commented 3 years ago

I came here to post exactly this, including the "I'm not sure if I should be relying on this being stable" but it broke my tests on CI but not locally and was very confusing.

taiki-e commented 3 years ago

Sorry for the breakage!

As for this topic, I tend to follow rand's docs.

Any “value-breaking” changes to the generator should require bumping at least the minor version and documentation of the change.

https://docs.rs/rand/0.8.4/rand/trait.SeedableRng.html#tymethod.from_seed