Repository navigation
Funcky.Async 2.0: build on System.Linq.AsyncEnumerable and remove the Await operators - #1040
Open
FreeApophis wants to merge 1 commit into
Open
FreeApophis wants to merge 1 commit into
FreeApophis wants to merge 1 commit into
Conversation
… Await operators Funcky.Async drops System.Linq.Async 5/6 and compiles Funcky's async sources against System.Linq.AsyncEnumerable, the package that is the .NET 10 base class library's IAsyncEnumerable LINQ, so the sources need no conditional compilation any more: the SystemLinqAsyncAdapter, the AsyncGrouping type, the Chunk(size) shim and every SYSTEM_LINQ_ASYNC branch are gone, and AdjacentGroupBy returns IGrouping on every framework. System.Linq.Async 7 was not chosen because it also brings System.Interactive.Async along, whose Merge on a sequence of sequences silently wins over Funcky's sorted Merge. The twelve lazy Await/AwaitWithCancellation operators and the AwaitAsync / AwaitWithCancellationAsync overloads of the eight terminal aggregations, obsolete since 3.8.0, are removed from the net10.0 asset of Funcky and from Funcky.Async together with their tests; the PublicAPI files record the removals and the changed AdjacentGroupBy signatures. The code fix stays as the migration aid and now also fires on the compile error CS1061 a removed name leaves behind, recognizing the call by its name, a receiver the replacement accepts and the shape of the arguments. Closes #925 Closes #981 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 30, 2026
This branch has not been deployed
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.
Closes #925 and #981, shipped together as groomed so Funcky.Async consumers migrate once. Stacked on #1039 (base
remove-option-from-boolean); retarget after #1037 and #1039 merge.Decision (confirmed 30 Oct 2026): System.Linq.AsyncEnumerable instead of System.Linq.Async 7
#925 says "require System.Linq.Async
[7.0.0, 8)". I started that way and twoMergetests failed on net8/net9: System.Linq.Async 7 is a facade over System.Linq.AsyncEnumerable that also depends on System.Interactive.Async, whoseAsyncEnumerableEx.Merge(this IEnumerable<IAsyncEnumerable<T>>)wins overload resolution over Funcky'sMerge(…, Option<IComparer<T>> comparer = default)because it needs no default argument. Every Funcky.Async 2.0 consumer callingsources.Merge()would silently get Ix's concurrent merge instead of Funcky's sorted one, and the alternative (a parameterless Funcky overload) turns that into a CS0121 ambiguity for everyone. On top, 7.0.0's dependency graph carries a vulnerable Microsoft.Bcl.Memory (NU1903, an error under CI's warnings-as-errors).Funcky.Async therefore depends on System.Linq.AsyncEnumerable
[10.0.6, 12)directly, the package that is the .NET 10 base class library LINQ; the shared sources compile identically on both sides and no Ix enters the graph. A consumer that still references System.Linq.Async 5 or 6 gets CS0433 onSystem.Linq.AsyncEnumerable(loud, and the fix is to upgrade that reference to System.Linq.Async 7, a facade over the same package, or drop it). The reasoning is recorded inDirectory.Packages.props, the changelog and the async chapter. Confirmed by the maintainer on 30 Oct 2026.#925
SystemLinqAsyncAdapter,SystemLinqAsyncTestAdapter,AsyncGrouping, theChunk(size)shim and everySYSTEM_LINQ_ASYNCbranch (sources and tests) are gone;AdjacentGroupByreturnsIGroupingeverywhere,Grouping.csis linked into Funcky.Async for that.10.0.6and newest10.0.14of System.Linq.AsyncEnumerable. Funcky.Async becomes 2.0.0.CompatibilitySuppressions.xmlis empty now: all 36 suppressions were theIAsyncGrouping/IGroupingdifferences between the net10.0 forward asset and the others.#981
…Await/…AwaitWithCancellationoperators and the…AwaitAsync/…AwaitWithCancellationAsyncoverloads of the eight terminal aggregations are removed (three files deleted, the rest trimmed, orphaned private helpers removed) together with their tests; theAwaitSelectortest generator went with them.*REMOVED*lines per asset (net10.0/net11.0 of Funcky, all four groups of Funcky.Async), plus the 8IAsyncGroupingsignatures andChunk(int)removed and the 8IGroupingsignatures added for Funcky.Async.AsyncEnumerableAwaitOperatorCodeFixkeeps the CS0618 path and now also handles CS1061: it recognizes the call by its name, by the receiver being a type the replacement's first parameter accepts, and classifies delegate arguments by syntax and type (lambda arity, delegate invoke arity, method group arity). Named arguments or an argument it cannot classify leave the call alone. New test classAsyncEnumerableAwaitOperatorRemovedCodeFixTestmirrors the CS0618 cases.Verified locally: Release build of the solution with
TreatWarningsAsErrors, Funcky.Test 1596/1596 (net11.0) and 1562/1562 (net10.0), Funcky.Async.Test 424/424 on net9.0 and net8.0 at 10.0.6 and at 10.0.14, Funcky.Analyzers.Test 262/262.🤖 Generated with Claude Code