Skip to content

Inline StepRng #2316

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

Merged
merged 2 commits into from
Aug 1, 2025
Merged

Inline StepRng #2316

merged 2 commits into from
Aug 1, 2025

Conversation

djc
Copy link
Member

@djc djc commented Jul 22, 2025

This has been deprecated upstream. Inlining a simplified copy of the upstream code seems like the easiest solution to the problem we're solving here (testing the reserved transport parameter ID generation code for edge cases).

@Ralith
Copy link
Collaborator

Ralith commented Jul 22, 2025

The deprecation PR makes a credible argument that code, such as ours, which isn't implementing a primitive (i.e. next_u64-based) distribution shouldn't be using this at all. IIUC the intent of this test is just to run the generator a bunch and sanity-check its outputs. Should we switch to a single instance of a stable real RNG instead?

@djc
Copy link
Member Author

djc commented Jul 23, 2025

Should we switch to a single instance of a stable real RNG instead?

The test code here seems carefully constructed to test a bunch of edge cases that might occur. We wouldn't get that level of coverage from switching to a real RNG, right?

@Ralith
Copy link
Collaborator

Ralith commented Jul 23, 2025

My concern is that the proposition that those edge cases are, in fact, being exercised relies on assumptions about the implementation of random_range that may not be true today, much less forever.

Copy link
Collaborator

@Ralith Ralith left a comment

Choose a reason for hiding this comment

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

Let's get this in to unblock the update in the short term regardless.

@Ralith Ralith added this pull request to the merge queue Aug 1, 2025
Merged via the queue into main with commit 1cc50da Aug 1, 2025
20 checks passed
@Ralith Ralith deleted the inline-step-rng branch August 1, 2025 19:55
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