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
When wrapping a CompletableFuture with a Task, Task.from is often used in this library. However, this means that the CompletableFuture will be executed even if the Task is not evaluated (i.e., it is not referential transparent). This is not the expected behavior for many users.
Actually, from is implicitly using fromFutureLike via fromAnyFutureViaLift.
But I think that your point is still valid and to make the referential transparent we should wrap it with Task.defer
When wrapping a
CompletableFuture
with a Task,Task.from
is often used in this library. However, this means that theCompletableFuture
will be executed even if theTask
is not evaluated (i.e., it is not referential transparent). This is not the expected behavior for many users.e.g.
monix-connect/s3/src/main/scala/monix/connect/s3/S3.scala
Lines 714 to 715 in cb3f2c2
I think it is correct to use
Task.fromFutureLike
.The text was updated successfully, but these errors were encountered: