Conversation
Having dealt with all the clashes in System.Linq.Async, it turns out that there are further methods in
We were picking up extra DLLs causing great confusion
mwadams
approved these changes
Nov 13, 2025
There was a problem hiding this comment.
Pull Request Overview
This pull request addresses compatibility issues between System.Interactive.Async and the new System.Linq.AsyncEnumerable that ships in .NET 10, with the primary goal of ensuring both libraries can coexist without conflicts.
Key Changes
- Added obsolete attributes to
Distinctmethods that are superseded byDistinctByinSystem.Linq.AsyncEnumerable - Introduced
MaxByWithTiesAsyncandMinByWithTiesAsyncto differentiate from the standard LINQ operators - Fixed reference assembly packaging to properly handle lib/ref mismatches across target frameworks
Reviewed Changes
Copilot reviewed 25 out of 25 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Ix.NET/Source/refs/System.Interactive.Async/System.Interactive.Async.csproj |
New reference assembly project with conditional System.Linq.AsyncEnumerable dependency for non-net10.0 targets |
Ix.NET/Source/System.Interactive.Async/System.Interactive.Async.csproj |
Added reference assembly packaging and NuGet warning suppressions for intentional lib/ref mismatches |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Distinct.cs |
Marked projection-based Distinct overloads as obsolete, directing users to DistinctBy |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/MinByWithTies.cs |
New file implementing MinByWithTiesAsync to avoid clash with standard LINQ MinByAsync |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/MaxByWithTies.cs |
New file implementing MaxByWithTiesAsync to avoid clash with standard LINQ MaxByAsync |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/MinBy.cs |
Moved ExtremaBy helper methods to MinByWithTies.cs and wrapped in !REFERENCE_ASSEMBLY directive |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/MaxBy.cs |
Wrapped in !REFERENCE_ASSEMBLY directive; implementation now shares helpers with MaxByWithTies.cs |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Min.cs |
Wrapped in !REFERENCE_ASSEMBLY directive to exclude from reference assembly |
Ix.NET/Source/System.Interactive.Async/System/Linq/Operators/Max.cs |
Wrapped in !REFERENCE_ASSEMBLY directive to exclude from reference assembly |
Ix.NET/Source/System.Linq.Async/System.Linq.Async.csproj |
Fixed reference assembly packaging path pattern |
Ix.NET/Source/System.Interactive/System.Interactive.csproj |
Fixed reference assembly packaging path pattern |
Ix.NET/Source/System.Interactive.Providers/System.Interactive.Providers.csproj |
Fixed reference assembly packaging path pattern |
Ix.NET/Source/System.Interactive.Async.Providers/System/Linq/AsyncQueryableEx.Generated.cs |
Added query provider overloads for AsAsyncEnumerable, AverageAsync, MinByWithTiesAsync, and MaxByWithTiesAsync |
Ix.NET/Source/System.Linq.Async.SourceGenerator/AsyncOverloadsGenerator.cs |
Fixed generator to skip empty groupings |
Ix.NET/Source/AsyncQueryableGenerator.t4 |
Added code to skip ToObservable method which cannot be represented in queries |
Ix.NET/Source/Playground/Playground.csproj |
Marked as non-packable |
Ix.NET/Source/FasterLinq/FasterLinq.csproj |
Marked as non-packable |
Ix.NET/Source/Benchmarks.System.Interactive/Benchmarks.System.Interactive.csproj |
Marked as non-packable |
Ix.NET/Source/ApiCompare/ApiCompare.csproj |
Marked as non-packable |
Ix.NET/Source/Ix.NET.sln |
Added reference assembly project to solution, updated Visual Studio version |
Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsync.verified.cs |
Updated API approval tests with obsolete attributes and new methods |
Ix.NET/Source/Tests.System.Interactive.ApiApprovals/Api/ApiApprovalTests.SystemInteractiveAsyncProviders.verified.cs |
Updated API approval tests with new query provider methods |
Ix.NET/Source/System.Interactive.Async.Tests/System/Linq/Operators/MinByWithTies.cs |
New test file for MinByWithTiesAsync |
Ix.NET/Source/System.Interactive.Async.Tests/System/Linq/Operators/MaxByWithTies.cs |
New test file for MaxByWithTiesAsync |
Ix.NET/Documentation/adr/0002-System-Linq-Async-In-Net10.md |
Updated ADR with explanation of the clashes and resolution strategy |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+60
to
+70
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | ||
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | ||
| "tBy.")] | ||
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, System.Threading.Tasks.ValueTask<TKey>> keySelector) { } | ||
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | ||
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | ||
| "tBy.")] | ||
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, TKey> keySelector) { } | ||
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | ||
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | ||
| "tBy.")] |
There was a problem hiding this comment.
Corrected spelling of 'DistinctBy' (was split as 'Distinc' + 'tBy' due to line break).
Suggested change
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | |
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | |
| "tBy.")] | |
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, System.Threading.Tasks.ValueTask<TKey>> keySelector) { } | |
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | |
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | |
| "tBy.")] | |
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, TKey> keySelector) { } | |
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and" + | |
| " the functionality of selector-based overloads of Distinct now exists as Distinc" + | |
| "tBy.")] | |
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality of selector-based overloads of Distinct now exists as DistinctBy.")] | |
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, System.Threading.Tasks.ValueTask<TKey>> keySelector) { } | |
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality of selector-based overloads of Distinct now exists as DistinctBy.")] | |
| public static System.Collections.Generic.IAsyncEnumerable<TSource> Distinct<TSource, TKey>(this System.Collections.Generic.IAsyncEnumerable<TSource> source, System.Func<TSource, TKey> keySelector) { } | |
| [System.Obsolete("Use DistinctBy. IAsyncEnumerable LINQ is now in System.Linq.AsyncEnumerable, and the functionality of selector-based overloads of Distinct now exists as DistinctBy.")] |
hmawhoob-dot
pushed a commit
to hmawhoob-dot/reactive
that referenced
this pull request
Dec 1, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Although the intent of
System.Interactive.Asyncis to contain non-standard LINQ operators, withSystem.Linq.Asynccontaining only standard ones, 'standard LINQ operators' is a somewhat nebulous concept. It turns out that since the original split betweenSystem.Interactive.AsyncandSystem.Linq.Asyncwas established,System.Linq.AsyncEnumerabledefines some methods that we had considered to be non-standard operators. (E.g.,System.Interactive.Asyncoffered projection-based forms ofDistinct. But these have been superseded by the new standardDistinctBy.)The result is that it turns out that in order to accommodate the arrival of
System.Linq.AsyncEnumerablein .NET 10 (available to downlevel runtimes via NuGet), it is necessary not only to updateSystem.Linq.Async(which we already did) but also to fixSystem.Interactive.Async.Also, it turned out we had some issues with how we were building ref assemblies, and this fixes that too.