Skip to content

Commit a35a174

Browse files
authored
Ix.NET v7 release prep (#2274)
* Add v7 release notes and NuGet readme for System.Linq.Async * Fix discrepancies in Obsolete attributes * Reinstated some operations that got left out. * Revert IX.NET TFMs in all but System.Linq.Async
1 parent 1e8f6bd commit a35a174

21 files changed

+168
-127
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Ix Release History v7.0
2+
3+
4+
## v7.0.0
5+
6+
Ix.NET's `System.Linq.Async` is being deprecated. Instead, you should use the .NET runtime's [`System.Linq.AsyncEnumerable`](https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/10.0/asyncenumerable) library (new in .NET 10.0, but available for use on older runtimes). If you are using functionality in `System.Linq.Async` that has not been included in .NET's `System.Linq.AsyncEnumerable`, you can add a reference to `System.Interactive.Async`, which is the new home of this functionality.
7+
8+
Note that `System.Linq.Async` will continue to work. The LINQ implementation has been removed from `System.Linq.Async`'s public-facing API, so when a project upgrades to v7, any code that was previously using the `System.Linq.Async` implementation of LINQ for `IAsyncEnumerable<T>` will now use the `System.Linq.AsyncEnumerable` supplied by .NET 10. (This works even if your project targets older versions of .NET because the new `System.Linq.AsyncEnumerable` library supports these down-level targets, and `System.Linq.Async` supplies a transient reference to it for older targets.)
9+
10+
Binary compatibility is maintained by continuing to supply the full old LINQ implementation in the runtime libraries; we've removed this only from the reference assemblies. This makes `System.Linq.Async`'s deprecated LINQ implementation invisible to the compiler, but it remains available at runtime. (This ensures that if a project upgrades to v7, but is using components that were built against older versions, those components won't encounter exceptions at runtime due to the LINQ implementation not being in the component they expect.)
11+
12+
Note that if a project is using `System.Linq.Async` v6 and upgrades its target framework to .NET 10, it will encounter build errors. The compiler will have access to two implementations of LINQ to `IAsyncEnumerable<T>`, and will report ambiguity errors. The quick fix is to upgrade to v7 of this library. The longer term fix is to remove all references to this library. (This can also happen to projects that target older versions of .NET. If a project using `System.Linq.Async` ends up also acquiring a dependency on `System.Linq.AsyncEnumerable`, again the compiler will report ambiguity errors any place you try to use LINQ for `IAsyncEnumerable<T>`. Again the short term fix is to upgrade to v7 of `System.Linq.Async` and the longer term fix is to stop using it.) We will eventually mark the `System.Linq.Async` package as deprecated on NuGet.
13+
14+
### Why did this move?
15+
16+
The short answer is that Ix.NET was, for many years, plugging a gap in the .NET runtime libraries. The .NET runtime has finally filled in that gap, so it is time for Ix.NET to step out of the way.
17+
18+
Something that is not entirely obvious from the naming is that `System.Linq.Async` never had support from Microsoft. This table may clarify the situation:
19+
20+
| Library | Parent Project | Supported by |
21+
|---|---|---|
22+
| `System.Linq.Async` | Ix.NET | Unfunded community efforts |
23+
| `System.Linq.AsyncEnumerable` | .NET Runtime | Microsoft |
24+
25+
26+
When `IAsyncEnumerable<T>` first moved into the .NET runtime class libraries (in .NET Core 3.0), there was no officially supported LINQ implementation. The `IAsyncEnumerable<T>` interface had originated from the Ix.NET project, which had always supplied a LINQ implementation, so when `IAsyncEnumerable<T>` moved into the .NET runtime libraries, Ix.NET just adjusted its existing LINQ for `IAsyncEnumerable<T>` to work with the interface's new home. Thus `System.Linq.Async` became the unofficial de facto LINQ for `IAsyncEnumerable<T>`. However, there was no official support from Microsoft, and no budget for maintenance. Eventually, Microsoft decided that the .NET runtime libraries really should have a built-in LINQ for `IAsyncEnumerable<T>`, and thus `System.Linq.AsyncEnumerable` was born.
27+
28+
(The .NET runtime class library team decided to define a new library instead of taking over Ix.NET's existing `System.Linq.Async` because class library design guidelines had changed since `System.Linq.Async` was created and it did not align with them.)

Ix.NET/Source/System.Interactive.Async.Providers/System.Interactive.Async.Providers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>Interactive Extensions Async Providers Library used to build query providers and express queries over async enumerable sequences.</Description>
55
<AssemblyTitle>Interactive Extensions - Async Providers Library</AssemblyTitle>
6-
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net6.0</TargetFrameworks>
77
<PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
88
</PropertyGroup>
99

Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
any versions older than net10.0 because net8.0 and net9.0 are both covered
1313
by the netstandard2.0 target.
1414
-->
15-
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net10.0</TargetFrameworks>
15+
<TargetFrameworks>net48;netstandard2.0;netstandard2.1;net6.0;net10.0</TargetFrameworks>
1616
<PackageTags>Ix;Interactive;Extensions;Enumerable;Asynchronous</PackageTags>
1717
</PropertyGroup>
1818

Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<PropertyGroup>
44
<Description>Interactive Extensions Providers Library used to build query providers and express queries over enumerable sequences.</Description>
55
<AssemblyTitle>Interactive Extensions - Providers Library</AssemblyTitle>
6-
<TargetFrameworks>net48;netstandard2.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks>net48;netstandard2.0;net6.0</TargetFrameworks>
77
<PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
88
</PropertyGroup>
99

Ix.NET/Source/System.Interactive/System.Interactive.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Description>Interactive Extensions Main Library used to express queries over enumerable sequences.</Description>
55
<AssemblyTitle>Interactive Extensions - Main Library</AssemblyTitle>
66
<Authors>Microsoft</Authors>
7-
<TargetFrameworks>net48;netstandard2.0;net8.0</TargetFrameworks>
7+
<TargetFrameworks>net48;netstandard2.0;net6.0</TargetFrameworks>
88
<PackageTags>Ix;Interactive;Extensions;Enumerable</PackageTags>
99
</PropertyGroup>
1010

Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,13 @@
1313
<Title>System.Linq.Async</Title>
1414
<PackageTags>LINQ;async;streams;query</PackageTags>
1515
<Description>Provides support for Language-Integrated Query (LINQ) over IAsyncEnumerable&lt;T&gt; sequences.</Description>
16+
<PackageReadmeFile>readme.md</PackageReadmeFile>
1617
</PropertyGroup>
1718

19+
<ItemGroup>
20+
<None Include="build\NuGet.Readme.md" Pack="true" PackagePath="\readme.md" />
21+
</ItemGroup>
22+
1823
<ItemGroup>
1924
<!--
2025
Incorporate the reference assemblies.

Ix.NET/Source/System.Linq.Async/System/Linq/Operators/All.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static async ValueTask<bool> Core(IAsyncEnumerable<TSource> source, Func<TSource
5858
/// <exception cref="ArgumentNullException"><paramref name="source"/> or <paramref name="predicate"/> is <see langword="null"/>.</exception>
5959
/// <remarks>The return type of this operator differs from the corresponding operator on IEnumerable in order to retain asynchronous behavior.</remarks>
6060
[GenerateAsyncOverload]
61-
[Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AllAwaitAsync functionality now exists as overloads of All.")]
61+
[Obsolete("Use AllAsync. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the AllAwaitAsync functionality now exists as overloads of AllAsync.")]
6262
private static ValueTask<bool> AllAwaitAsyncCore<TSource>(this IAsyncEnumerable<TSource> source, Func<TSource, ValueTask<bool>> predicate, CancellationToken cancellationToken = default)
6363
{
6464
if (source == null)

0 commit comments

Comments
 (0)