Skip to content

Conversation

@PhenX
Copy link
Collaborator

@PhenX PhenX commented Nov 23, 2025

Fixes #58

Copilot AI and others added 6 commits November 23, 2025 09:59
Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com>
Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com>
Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com>
Co-authored-by: PhenX <42170+PhenX@users.noreply.github.com>
@PhenX PhenX marked this pull request as ready for review November 23, 2025 12:39
@PhenX PhenX requested a review from Copilot January 12, 2026 22:17
Copy link

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 pull request adds support for projectable method overloads by including parameter type information in the generated class names. Previously, methods with the same name but different parameter types would cause name collisions in the generated code. The solution encodes parameter types into the generated class name (e.g., _Method_P0_int_P1_string) to make each overload unique.

Changes:

  • Modified the source generator to collect parameter type names and include them in generated class names using Roslyn's SymbolDisplayFormat.FullyQualifiedFormat
  • Updated the runtime resolver to reconstruct parameter type names from reflection and match them to generated classes
  • Added comprehensive tests for method overloads with different parameter types and counts

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/EntityFrameworkCore.Projectables.Generator/ProjectableDescriptor.cs Added ParameterTypeNames property to store parameter types
src/EntityFrameworkCore.Projectables.Generator/ProjectableInterpreter.cs Collects parameter type names from method symbols using Roslyn
src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs Passes parameter type names to class name generator
src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionClassNameGenerator.cs Encodes parameter types into generated class names with sanitization
src/EntityFrameworkCore.Projectables/Services/ProjectionExpressionResolver.cs Reconstructs parameter type names at runtime to find generated classes
tests/EntityFrameworkCore.Projectables.Generator.Tests/ProjectionExpressionGeneratorTests.cs Added tests for method overloads with different types and counts
tests/EntityFrameworkCore.Projectables.FunctionalTests/MethodOverloadsTests.cs End-to-end tests verifying overload resolution works correctly
tests/*/verified.txt files Updated baseline snapshots to reflect new naming convention with parameter types

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

@PhenX PhenX added the enhancement New feature or request label Jan 14, 2026
@PhenX PhenX requested a review from koenbeuk January 15, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for projectable method overloads

1 participant