Skip to content
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

Deprecate hash_map and hash_set strategies? #494

Open
thomaseizinger opened this issue Aug 16, 2024 · 0 comments
Open

Deprecate hash_map and hash_set strategies? #494

thomaseizinger opened this issue Aug 16, 2024 · 0 comments
Labels
feature-request This issue is requesting new functionality

Comments

@thomaseizinger
Copy link
Contributor

I've noticed that the hash_map and hash_set strategies can be quite severe footguns. Iteration order of HashMaps and HashSets is non-deterministic. Hence, composing more strategies on top of a hash_map with .prop_flat_map will most likely yield non-deterministic behaviour and completely break the idea of reproducing a failing test case based on its seed.

I've spent many hours debugging my tests (proptest-state-machine specifically) until I finally got to the bottom of this.

I am not sure if deprecation is the right call but I think it should be called out or warned about somewhere.

@matthew-russo matthew-russo added the feature-request This issue is requesting new functionality label Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is requesting new functionality
Projects
None yet
Development

No branches or pull requests

2 participants