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 ZStream#takeWhile stopping on empty chunks #4273

Merged
merged 5 commits into from Oct 3, 2020

Conversation

iravid
Copy link
Member

@iravid iravid commented Oct 3, 2020

We go out of our way to drop empty chunks in most
constructors/combinators but some combinators might still emit empty
chunks - namely, ZStream#collect.

I'm not sure why it was implemented this way, but ZStream#takeWhile would stop when encountering an
empty chunk. This fixes the logic there.

Resolves #4272.

Also hardens some of the property checks by enhancing the stream generator to inject empty chunks into the generated streams.

jdegoes
jdegoes previously approved these changes Oct 3, 2020
@iravid iravid merged commit 7e27aa2 into zio:master Oct 3, 2020
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.

ZStream#takeWhile bug
2 participants