Skip to content

Fixes asynchronous LINQ methods not being converted to their synchronous counterparts#123

Merged
virzak merged 1 commit into
zompinc:masterfrom
michelebastione:linq-fixes
Jun 26, 2026
Merged

Fixes asynchronous LINQ methods not being converted to their synchronous counterparts#123
virzak merged 1 commit into
zompinc:masterfrom
michelebastione:linq-fixes

Conversation

@michelebastione

@michelebastione michelebastione commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

This PR addresses a small regression causing IAsyncEnumerable LINQ methods belonging to the AsyncEnumerable class to be left as is rather than being transformed to the respective IEnumerable LINQ methods of the Enumerable class. This happened because of a change intended to avoid conversion of EntityFrameworkQueryableExtensions methods to System.Linq.Queryable when a compatible "Asyncless" method was already present among the EF Core extensions.
This ended up also affecting the IAsyncEnumerable extensions, which for the most part lack the "Async" suffix so they were already deamed compatible and their transformation was skipped.

The fix consists in adding a condition that forces conversion when the containing type happens to be AsyncEnumerable.

fixes #118

@virzak virzak merged commit 3fcb4e0 into zompinc:master Jun 26, 2026
4 checks passed
@michelebastione michelebastione deleted the linq-fixes branch June 26, 2026 15:33
@0xced

0xced commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Wow, this one was a tough one to get right! Thanks for fixing the fix of my initial fix. 😁

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.

Regression with Linq

3 participants