Skip to content

Funcky.Async 2.0: build on System.Linq.AsyncEnumerable and remove the Await operators - #1040

Open
FreeApophis wants to merge 1 commit into
remove-option-from-booleanfrom
async-2-0
Open

FreeApophis wants to merge 1 commit into
remove-option-from-booleanfrom
async-2-0

Conversation

@FreeApophis

@FreeApophis FreeApophis commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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 two Merge tests failed on net8/net9: System.Linq.Async 7 is a facade over System.Linq.AsyncEnumerable that also depends on System.Interactive.Async, whose AsyncEnumerableEx.Merge(this IEnumerable<IAsyncEnumerable<T>>) wins overload resolution over Funcky's Merge(…, Option<IComparer<T>> comparer = default) because it needs no default argument. Every Funcky.Async 2.0 consumer calling sources.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 on System.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 in Directory.Packages.props, the changelog and the async chapter. Confirmed by the maintainer on 30 Oct 2026.

#925

  • SystemLinqAsyncAdapter, SystemLinqAsyncTestAdapter, AsyncGrouping, the Chunk(size) shim and every SYSTEM_LINQ_ASYNC branch (sources and tests) are gone; AdjacentGroupBy returns IGrouping everywhere, Grouping.cs is linked into Funcky.Async for that.
  • CI matrix: floor 10.0.6 and newest 10.0.14 of System.Linq.AsyncEnumerable. Funcky.Async becomes 2.0.0.
  • Funcky.Async's CompatibilitySuppressions.xml is empty now: all 36 suppressions were the IAsyncGrouping/IGrouping differences between the net10.0 forward asset and the others.

#981

  • The twelve …Await/…AwaitWithCancellation operators and the …AwaitAsync/…AwaitWithCancellationAsync overloads of the eight terminal aggregations are removed (three files deleted, the rest trimmed, orphaned private helpers removed) together with their tests; the AwaitSelector test generator went with them.
  • PublicAPI: 116 *REMOVED* lines per asset (net10.0/net11.0 of Funcky, all four groups of Funcky.Async), plus the 8 IAsyncGrouping signatures and Chunk(int) removed and the 8 IGrouping signatures added for Funcky.Async.
  • AsyncEnumerableAwaitOperatorCodeFix keeps 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 class AsyncEnumerableAwaitOperatorRemovedCodeFixTest mirrors the CS0618 cases.
  • Changelog, async chapter and the package readme updated.

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

… 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 branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant