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

Fix the infinitely looping Errors shrinker #84

Merged
merged 4 commits into from
Dec 10, 2024
Merged

Conversation

jorisdral
Copy link
Collaborator

See the commit messages for an explanation

@jorisdral jorisdral requested a review from a team as a code owner December 9, 2024 21:47
@jorisdral jorisdral force-pushed the jdral/fix-errors-shrink branch from dbc9f07 to 6b8b653 Compare December 9, 2024 22:07
When `Errors` are empty (`allNull`) and we start shrinking, the shrinker will
loop forever. The cause lies in the `genInfinite` function for `Stream`s, which
generates a finite list even though it is marked as infinite. The next commit
introduces a minimal bug fix.
@jorisdral jorisdral force-pushed the jdral/fix-errors-shrink branch from 288b0c2 to 5170704 Compare December 9, 2024 22:12
This makes the `prop_regression_shrinkEmptyErrors` property succeed, and not
loop forever during shrinking.
@jorisdral jorisdral force-pushed the jdral/fix-errors-shrink branch from 5170704 to 2c89665 Compare December 9, 2024 22:12
Copy link
Contributor

@jasagredo jasagredo left a comment

Choose a reason for hiding this comment

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

Discussed it on a call, looks good!

@jorisdral jorisdral added this pull request to the merge queue Dec 10, 2024
Merged via the queue into main with commit 8423cb3 Dec 10, 2024
22 checks passed
@jorisdral jorisdral deleted the jdral/fix-errors-shrink branch December 10, 2024 14:23
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