Skip to content

.Net: Prepare code for A2A SDK and AsyncEnumerable NuGet update #12842

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

SergeyMenshykh
Copy link
Member

@SergeyMenshykh SergeyMenshykh commented Aug 1, 2025

Motivation, Context and Description

This PR prepares the SK codebase for a future update of the A2A agent to the new A2A .NET SDK and establishes the foundation for easy adoption of the System.Linq.AsyncEnumerable package when it released. This will completely eliminate the need for the AsyncEnumerable polyfills that SK currently uses.

As part of this preparation, this PR stops using of the System.Linq.Async package and replaces all SK calls to its APIs with either equivalent calls to the AsyncEnumerable polyfills or in-place implementations. This prevents "The call is ambiguous between..." name conflicts that would occur when the AsyncEnumerable APIs from the A2A .NET SDK's transitive dependency (System.Linq.AsyncEnumerable) become available to the Agents.UnitTests project, which already contains equivalent APIs from either AsyncEnumerable polyfills and/or the System.Linq.Async package brought in from other projects that have the Agents.UnitTests project specified as "InternalVisibleTo".

As a result, almost all non-production code (tests and samples) uses AsyncEnumerable APIs from the preview version of the System.Linq.AsyncEnumerable package, while production code uses either AsyncEnumerable APIs from polyfills or uses in-place implementations.

@SergeyMenshykh SergeyMenshykh self-assigned this Aug 1, 2025
@SergeyMenshykh SergeyMenshykh requested a review from a team as a code owner August 1, 2025 11:00
@moonbox3 moonbox3 added .NET Issue or Pull requests regarding .NET code kernel Issues or pull requests impacting the core kernel labels Aug 1, 2025
@github-actions github-actions bot changed the title .NET: Prepare code for A2A SDK and AsyncEnumerable NuGet update .Net: Prepare code for A2A SDK and AsyncEnumerable NuGet update Aug 1, 2025
@SergeyMenshykh SergeyMenshykh added this pull request to the merge queue Aug 6, 2025
Merged via the queue into microsoft:main with commit bb67609 Aug 6, 2025
19 checks passed
@SergeyMenshykh SergeyMenshykh deleted the prep-for-a2a-sdk-and-asyncenumerable-nuget branch August 6, 2025 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kernel Issues or pull requests impacting the core kernel .NET Issue or Pull requests regarding .NET code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants