Skip to content

Config : support providing full hex-encoded seeds via PROPTEST_RNG_SEED#558

Open
matthew-russo wants to merge 1 commit intoproptest-rs:mainfrom
matthew-russo:fix-556-hex-seed-config
Open

Config : support providing full hex-encoded seeds via PROPTEST_RNG_SEED#558
matthew-russo wants to merge 1 commit intoproptest-rs:mainfrom
matthew-russo:fix-556-hex-seed-config

Conversation

@matthew-russo
Copy link
Member

fixes #556

Copy link

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

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

@matthew-russo, thank you for working on this (via #556) 🙏 ❤️

Can we avoid requiring the hex- prefix for replay? The process is already
a bit complex. If the replay file is there, just use it. If not, the failure
message should mention how to replay with hex-. Also, there's
PROPTEST_RNG_SEED to consider. Adding another format rule adds friction.


Better: auto-detect the seed format.
Try to parse the seed as a hex string of the right length.
If that works, use it as a hex seed.
Otherwise, parse it as a u64.

This lets users copy-paste seeds from failure output as-is.
Also works cleanly with PROPTEST_RNG_SEED.

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.

Add PROPTEST_RNG_SEED to the output file on failure

2 participants