Skip to content

Conversation

@alexeyzimarev
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings November 13, 2025 16:54
Copilot finished reviewing on behalf of alexeyzimarev November 13, 2025 16:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR aims to add .NET 10 as a target framework to the KurrentDB.Client library. The changes include updating the target frameworks, upgrading GitHub Actions versions, replacing the System.Linq.Async package, and modifying async enumerable usage patterns throughout the codebase.

  • Updates target frameworks to include net10.0 alongside existing net48, net8.0, and net9.0
  • Replaces System.Linq.Async package with a new async enumerable package
  • Updates GitHub Actions to use newer versions (checkout@v5, setup-dotnet@v5)

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Directory.Build.props Adds net10.0 to target frameworks
src/KurrentDB.Client/KurrentDB.Client.csproj Replaces System.Linq.Async package dependency and removes legacy shim files
src/KurrentDB.Client/PersistentSubscriptions/PersistentSubscription.cs Removes cancellation token parameter from MoveNextAsync() calls (correct API usage)
test/KurrentDB.Client.Tests.Common/Extensions/AsyncEnumerableExtensions.cs Adds custom ForEachAwaitAsync extension method
test/KurrentDB.Client.Tests/PersistentSubscriptions/SubscribeToAll/SubscribeToAllTests.cs Updates SelectAwait to Select with modified lambda signatures
test/KurrentDB.Client.Tests/PersistentSubscriptions/SubscribeToStream/SubscribeToStreamTests.cs Updates SelectAwait to Select with modified lambda signatures
.github/workflows/test.yml Updates action versions and adds net10.0 to test matrix
.github/workflows/publish.yml Updates action versions and adds net10.0 to build matrix

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +341 to +342
.Select(
async (PersistentSubscriptionMessage.Event e, CancellationToken _) => {
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lambda signature change from async e => to async (PersistentSubscriptionMessage.Event e, CancellationToken _) => indicates a breaking API change in the async LINQ library. This suggests that .Select() now requires a different signature than .SelectAwait() did. However, since the replacement package System.Linq.AsyncEnumerable at version 10.0.0 does not exist, this change cannot work. You should verify the actual API requirements of the async LINQ library being used.

Suggested change
.Select(
async (PersistentSubscriptionMessage.Event e, CancellationToken _) => {
.SelectAwait(
async e => {

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong suggestion, the API conforms to the System.Linq.AsyncEnumerable API

.SelectAwait(
async e => {
.Select(
async (PersistentSubscriptionMessage.Event e, CancellationToken _) => {
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lambda signature change from async e => to async (PersistentSubscriptionMessage.Event e, CancellationToken _) => indicates a breaking API change in the async LINQ library. However, since the replacement package System.Linq.AsyncEnumerable at version 10.0.0 does not exist, this change cannot work. You should verify the actual API requirements of the async LINQ library being used.

Suggested change
async (PersistentSubscriptionMessage.Event e, CancellationToken _) => {
async e => {

Copilot uses AI. Check for mistakes.
.SelectAwait(
async e => {
.Select(
async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => {
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lambda signature change from async e => to async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => indicates a breaking API change in the async LINQ library. However, since the replacement package System.Linq.AsyncEnumerable at version 10.0.0 does not exist, this change cannot work. You should verify the actual API requirements of the async LINQ library being used.

Suggested change
async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => {
async e => {

Copilot uses AI. Check for mistakes.
// ReSharper disable once CheckNamespace
namespace KurrentDB.Client.Tests;

public static class AsyncEnumerableExtensions {
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ForEachAwaitAsync extension method lacks XML documentation comments. Public extension methods should include XML documentation that describes the method's purpose, parameters, return value, and any exceptions that may be thrown.

Suggested change
public static class AsyncEnumerableExtensions {
public static class AsyncEnumerableExtensions {
/// <summary>
/// Asynchronously enumerates the elements of the source sequence and invokes the specified asynchronous action on each element.
/// </summary>
/// <typeparam name="TSource">The type of the elements in the source sequence.</typeparam>
/// <param name="source">The asynchronous sequence to enumerate.</param>
/// <param name="action">An asynchronous delegate to invoke on each element.</param>
/// <param name="cancellationToken">A cancellation token to observe while waiting for the task to complete.</param>
/// <returns>A task that represents the asynchronous operation.</returns>
/// <exception cref="OperationCanceledException">The operation was canceled.</exception>
/// <exception cref="Exception">Any exception thrown by the <paramref name="action"/> delegate.</exception>

Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@alexeyzimarev alexeyzimarev requested a review from w1am November 14, 2025 10:00
@alexeyzimarev alexeyzimarev merged commit 3baf672 into master Nov 14, 2025
150 of 151 checks passed
@alexeyzimarev alexeyzimarev deleted the system-link-async branch November 14, 2025 10:13
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.

3 participants