-
Notifications
You must be signed in to change notification settings - Fork 777
Description
System.Linq.Async (implemented as part of Ix.NET in this repo) has, since .NET Core 3.0, been the de facto implementation of LINQ for IAsyncEnumerable<T>. But .NET 10.0 now provides this functionality. System.Linq.Async needs to adapt to that if it's not going to cause backwards compatibility problems.
With System.Linq.Async as it stands, when anyone who uses this package upgrades to .NET 10 they will find that the LINQ operators for IAsyncEnumerable<T> are now all ambiguous: the C# compiler doesn't know whether we want to use the ones in the .NET runtime libraries, or the ones in System.Linq.Async.
This will also occur for any application that remains on older versions of .NET but adds a reference to the new System.Linq.AsyncEnumerable library. (It offers net462, netstandard2.0, net8.0 and net9.0 targets in addition to net10.0.)
To prevent this problem, System.Linq.Async should:
- add a transitive reference to
System.Linq.AsyncEnumerable - remove all extension methods that clash with those in
System.Linq.AsyncEnumerable - deprecate extension methods for which new equivalents exist in
System.Linq.AsyncEnumerable
We should also consider:
- moving any other methods into a new package that contains just the functionality in
System.Linq.AsyncthatSystem.Linq.AsyncEnumerablehas chosen not to replicate - where we remove APIs, doing so only in the
refassemblies (to prevent the clashing problems) but leaving the full original API present in thelibfolder assemblies to enable binary backwards compatibility