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.Async that System.Linq.AsyncEnumerable has chosen not to replicate
- where we remove APIs, doing so only in the
ref assemblies (to prevent the clashing problems) but leaving the full original API present in the lib folder assemblies to enable binary backwards compatibility
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 forIAsyncEnumerable<T>. But .NET 10.0 now provides this functionality.System.Linq.Asyncneeds to adapt to that if it's not going to cause backwards compatibility problems.With
System.Linq.Asyncas it stands, when anyone who uses this package upgrades to .NET 10 they will find that the LINQ operators forIAsyncEnumerable<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 inSystem.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.AsyncEnumerablelibrary. (It offersnet462,netstandard2.0,net8.0andnet9.0targets in addition tonet10.0.)To prevent this problem,
System.Linq.Asyncshould:System.Linq.AsyncEnumerableSystem.Linq.AsyncEnumerableSystem.Linq.AsyncEnumerableWe should also consider:
System.Linq.AsyncthatSystem.Linq.AsyncEnumerablehas chosen not to replicaterefassemblies (to prevent the clashing problems) but leaving the full original API present in thelibfolder assemblies to enable binary backwards compatibility