fsprojects / FSharp.Control.AsyncSeq

Asynchronous sequences for F#
https://fsprojects.github.io/FSharp.Control.AsyncSeq/
Other
161 stars 59 forks source link

Deprecate `FSharp.Control.IAsyncEnumerable` in favor of the same type in BCL #159

Open abelbraaksma opened 1 year ago

abelbraaksma commented 1 year ago

Description

With the event of TaskSeq coming to the masses, which used the NetStandard 2.1 IAsyncEnumerable, using both this lib and that one leads to issues because the same type with slightly different semantics lives in FSharp.Control.

This can be very subtle, for instance if your AsyncSeq reference is transient, you may not even be aware that you’ve brought this type into scope. Then you think you open the namespace of FSharp.Control to access taskSeq and code starts failing with confusing messages (confusing, because the different types look the same and have the same name).

I propose to deprecate that type in a next major version. This will also mean dropping support for NetStandard 2.0 and moving to 2.1, or to accept multiple versions of this library.

/cc @dsyme