-
Notifications
You must be signed in to change notification settings - Fork 6k
[Breaking change]: System.Linq.AsyncEnumerable in .NET 10 #44886
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Reopening so that details regarding this request can be added. |
@eiriktsarpalis At the time the original breaking change was published, we didn't have the API documented so we couldn't include XREFs. Those have been added, liberally, to answer the first part of the request asking for the details of what's included in the new library. Regarding the rest of the request, it appears there is no documentation available for I thought @stephentoub's recommendations were pretty clear, but what else can we provide here? |
Description
.NET 10 now includes the
AsyncEnumerable
class, which provides a full set of Language Integrated Query (LINQ) extension methods for theIAsyncEnumerable<T>
type. TheSystem.Linq.Async
NuGet library, although it sports a "System." prefix, was written and maintained by the community. This library is being replaced by the new built-in support in .NET 10, in part at the behest of the maintainers ofSystem.Linq.Async
. As a result, applications that currently reference theSystem.Linq.Async
package may get compilation errors about ambiguities, due to extension methods with the same signatures being provided both by the oldSystem.Linq.Async
library and by the built-in support.Version
.NET 10 Preview 1
Previous behavior
An
AsyncEnumerable
class in theSystem.Linq.Async
package provides LINQ support forIAsyncEnumerable<T>
.New behavior
An
AsyncEnumerable
class in .NET 10 as well as in aSystem.Linq.AsyncEnumerable
nuget package provides LINQ support forIAsyncEnumerable<T>
.Type of breaking change
Reason for change
IAsyncEnumerable<T>
has become core enough that it's important the platform itself provide LINQ support for the type. A swell of community support, including from the current maintainers ofSystem.Linq.Async
, petitioned for inclusion of such LINQ support directly in the platform.Recommended action
If the consuming code being upgraded to .NET 10 includes a direct package reference to
System.Linq.Async
, remove that package reference. If the code needs to multitarget, such that it needs to compile for both .NET 10 and for previous versions of .NET, add a package reference toSystem.Linq.AsyncEnumerable
instead.If
System.Linq.Async
is being consumed indirectly via a dependency on another package that depends onSystem.Linq.Async
, and that indirect dependency is leading to similar ambiguity errors, they can be avoided by including this in the project:Most consuming code will not need to change. However, some call sites might need updating to refer to newer names and signatures for functionality.
Feature area
Core .NET libraries
Affected APIs
System.Linq.AsyncEnumerable
Associated WorkItem - 373407
The text was updated successfully, but these errors were encountered: