-
Notifications
You must be signed in to change notification settings - Fork 37
feat: Add .NET 10 #373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add .NET 10 #373
Conversation
There was a problem hiding this 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.Asyncpackage 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.
| .Select( | ||
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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.
| .Select( | |
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | |
| .SelectAwait( | |
| async e => { |
There was a problem hiding this comment.
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 _) => { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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.
| async (PersistentSubscriptionMessage.Event e, CancellationToken _) => { | |
| async e => { |
| .SelectAwait( | ||
| async e => { | ||
| .Select( | ||
| async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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.
| async (PersistentSubscriptionMessage.Event e, CancellationToken ct) => { | |
| async e => { |
| // ReSharper disable once CheckNamespace | ||
| namespace KurrentDB.Client.Tests; | ||
|
|
||
| public static class AsyncEnumerableExtensions { |
Copilot
AI
Nov 13, 2025
There was a problem hiding this comment.
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.
| 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> |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
No description provided.