Skip to content

Conversation

matthew-russo
Copy link
Member

replaces #269. targets 2.x with breaking changes

thomaseizinger and others added 4 commits September 22, 2024 10:22
The tests didn't pass, and fixing them reliably seems impossible.
The previous shrinker always shrunk the inner strategy first.  This
seems to be the wrong thing to do in almost all non-trivial situations
(e.g., generate a vector length and then a pair of vectors of this
length).  The new shrinker shrinks the outer strategy first (e.g.,
tries to minimize the vector length first and then minimizes the entries
in the vectors).

Given the current implementation of shrinking via simplify/complicate,
I had a hard time doing this without cloning the inner strategy before
simplifying it. So there's a breaking change here because prop_flat_map
now requires the closure to produce a strategy that implements Clone.
This could have been avoided by a change in how simplify/complicate
operate, but this has the potential of breaking much more code than
adding the requirement that the inner strategy is clonable.
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.

3 participants