[scalaz-stream] failing assertion

22 views
Skip to first unread message

Luciano Leggieri

unread,
Jun 21, 2015, 7:43:54 PM6/21/15
to sca...@googlegroups.com
I have the following stream:

val stream: Process[Task, ByteVector] = ...
val s: Sink[Task, ByteVector] = sink.lift {
_ => Task.now(()) // does nothing for the purpose of this example
}
val hashedStream = scalaz.stream.writer.logged(stream).drainW(s.pipeIn(scalaz.stream.hash.sha1))

and it's failing on this assertion

It doesn't fail if I remove the writer. I think it's because scalaz.stream.hash.messageDigest emits on onComplete. 
It seems there is a law that says that a process cannot emit after it's been killed. Where can I find scalaz-stream laws? Any help is appreciated.

Thanks,
Luciano.

Luciano Leggieri

unread,
Jun 21, 2015, 11:26:16 PM6/21/15
to sca...@googlegroups.com
I've opened a PR that addresses this issue:


(also, it avoids wrapping an IOException inside another)
Reply all
Reply to author
Forward
0 new messages