You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently Body.fromStream* and Response.fromServerSentEvents fix the R type of the output stream to be Any. It blocks or makes difficult to implement some use cases such as:
A Server Sent Event response stream might want access internal modules via environment.
Use a resourceful ZIO effect with a stream body, i.e. A temporary file RIO[Scope, File] that should be deleted after the stream terminates.
There are some workarounds like ZIO.environmentWith(stream.provideEnvironment), but it does not go well with Scope because the stream outlives the handler in the current design.
The text was updated successfully, but these errors were encountered:
Currently
Body.fromStream*
andResponse.fromServerSentEvents
fix theR
type of the output stream to beAny
. It blocks or makes difficult to implement some use cases such as:RIO[Scope, File]
that should be deleted after the stream terminates.There are some workarounds like
ZIO.environmentWith(stream.provideEnvironment)
, but it does not go well withScope
because the stream outlives the handler in the current design.The text was updated successfully, but these errors were encountered: