Skip to content

Upgrade to rand 0.10#161

Open
benbrittain wants to merge 1 commit intohegeldev:mainfrom
benbrittain:push-vmlotklnppwq
Open

Upgrade to rand 0.10#161
benbrittain wants to merge 1 commit intohegeldev:mainfrom
benbrittain:push-vmlotklnppwq

Conversation

@benbrittain
Copy link
Copy Markdown

No description provided.

Copy link
Copy Markdown
Member

@Liam-DeVoe Liam-DeVoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Benjamin! Appreciate the great patch.

I found the following patch notes helpful when reviewing this PR:

I also had a long conversation with claude that convinced me the rust ecosystem has implicitly adopted the following policy: say A depends on B and exposes some types from B in its public API. If B releases a breaking version, A is expected to update to the latest B version unconditionally. Unlike Python, where I might support years of old dependency versions (Hypothesis does this, at moderate effort to us as maintainers but great benefit to our users), Rust expects the ecosystem to move to the latest version of its dependencies basically immediately.

I found https://github.com/dtolnay/semver-trick and the "libcpocalypse" mentioned there especially helpful as context.

(I'm sure this is all obvious to long-time rust experts!)

Comment on lines +51 to +54
impl TryRng for HegelRandom {
type Error = Infallible;

fn try_next_u32(&mut self) -> Result<u32, Self::Error> {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self-note: RngCore (renamed Rng) can't be impl'd anymore. Instead you are meant to impl TryRng with type Error = Infallible. rust-random/rand_core#45

Copy link
Copy Markdown
Member

@Liam-DeVoe Liam-DeVoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forgot one comment! Happy to merge once that's addressed.

- concisely describe any public-facing changes, and why. Internal-only changes can be documented as e.g. "This release improves an internal invariant."
- use `single backticks` for verbatim code.

After the pull request is merged, the contents of this file (except the first line) are automatically added to `CHANGELOG.md`. More examples can be found in that file.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After the pull request is merged, the contents of this file (except the first line) are automatically added to `CHANGELOG.md`. More examples can be found in that file.
RELEASE_TYPE: patch
This patch upgrades [`rand`](https://crates.io/crates/rand) to `0.10` in our `rand` feature.
Thanks to Benjamin Brittain for this patch!

No need to include the explanatory text :). I also changed to patch, because a minor version bump (which is equivalent to a major version bump while we are in beta; see) felt excessive for an opt-in feature, even if it is strictly speaking a breaking change.

Feel free to remove the attribution or change to your github handle if you prefer 🙂

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