-
Notifications
You must be signed in to change notification settings - Fork 849
Replace custom IAsyncEnumerable extensions with System.Linq.AsyncEnumerable #7039
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
Conversation
…erable Co-authored-by: adamsitnik <[email protected]>
adamsitnik
left a comment
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.
@copilot Please address my feedback.
src/Libraries/Microsoft.Extensions.DataIngestion/Microsoft.Extensions.DataIngestion.csproj
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Tests/ChatCompletion/DistributedCachingChatClientTest.cs
Outdated
Show resolved
Hide resolved
test/Libraries/Microsoft.Extensions.AI.Tests/Microsoft.Extensions.AI.Tests.csproj
Outdated
Show resolved
Hide resolved
...ies/Microsoft.Extensions.DataIngestion.Tests/Microsoft.Extensions.DataIngestion.Tests.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: adamsitnik <[email protected]>
All feedback addressed in commit 83b9f5d:
|
adamsitnik
left a comment
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.
@copilot please solve the following build error:
dotnet build --no-restore
Working Directory: D:\a_work\1\s\test\ProjectTemplates\Microsoft.Extensions.AI.Templates.IntegrationTests\ExecutionTestSandbox\AIChatWeb_ed87416b84\BasicApp_a14d7ae760
Command failed with non-zero exit code: 1
Standard Output:
D:\a_work\1\s.dotnet\sdk\10.0.100-rc.1.25451.107\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(345,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [D:\a_work\1\s\test\ProjectTemplates\Microsoft.Extensions.AI.Templates.IntegrationTests\ExecutionTestSandbox\AIChatWeb_ed87416b84\BasicApp_a14d7ae760\BasicApp.csproj]
D:\a_work\1\s\test\ProjectTemplates\Microsoft.Extensions.AI.Templates.IntegrationTests\ExecutionTestSandbox\AIChatWeb_ed87416b84\BasicApp_a14d7ae760\Services\SemanticSearch.cs(25,30): error CS0121: The call is ambiguous between the following methods or properties: 'System.Linq.AsyncEnumerable.Select<TSource, TResult>(System.Collections.Generic.IAsyncEnumerable<TSource>, System.Func<TSource, TResult>)' and 'System.Linq.AsyncEnumerable.Select<TSource, TResult>(System.Collections.Generic.IAsyncEnumerable<TSource>, System.Func<TSource, TResult>)' [D:\a_work\1\s\test\ProjectTemplates\Microsoft.Extensions.AI.Templates.IntegrationTests\ExecutionTestSandbox\AIChatWeb_ed87416b84\BasicApp_a14d7ae760\BasicApp.csproj]
You probably just need to update the following package reference:
Line 43 in 30d910f
| <PackageReference Include="System.Linq.Async" Version="${TemplatePackageVersion_SystemLinqAsync}" /> |
and use System.Linq.AsyncEnumerable there as well.
Co-authored-by: adamsitnik <[email protected]>
Fixed in commit b75fa75. Updated the template files to use System.Linq.AsyncEnumerable v10.0.0 instead of System.Linq.Async v6.0.3:
|
adamsitnik
left a comment
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.
LGTM!
Cleanup System.Linq.AsyncEnumerable
Replace custom IAsyncEnumerable extensions with System.Linq.AsyncEnumerable from .NET 10.
Plan:
Changes Made:
System.Linq.AsyncEnumerablev10.0.0 package toeng/packages/General.propsIAsyncEnumerableExtensions.csfrom DataIngestion.Tests (63 lines deleted)Chunkimplementation from Batching.cs (38 lines deleted)ToAsyncEnumerableAsyncwith directToAsyncEnumerable()in DistributedCachingChatClientTest.csToAsyncEnumerableAsync(IEnumerable<T>)helper methodToAsyncEnumerablemethod from ReducingChatClientTests.csusing System.Linq;to test files:GeneratedContent.targetsto defineTemplatePackageVersion_SystemLinqAsyncEnumerablewith version 10.0.0ChatWithCustomData-CSharp.Web.csproj.into referenceSystem.Linq.AsyncEnumerableinstead ofSystem.Linq.AsyncVerification:
Security Summary:
No security vulnerabilities introduced by this change. The System.Linq.AsyncEnumerable package v10.0.0 has no known vulnerabilities.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Microsoft Reviewers: Open in CodeFlow