-
-
Notifications
You must be signed in to change notification settings - Fork 0
Fix nested SelectExpr interceptor generation #213
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
…with correct names Co-authored-by: arika0093 <[email protected]>
…name extraction Co-authored-by: arika0093 <[email protected]>
Copilot
AI
changed the title
[WIP] Fix interceptor generation for nested SelectExpr
Fix nested SelectExpr interceptor generation
Dec 5, 2025
arika0093
added a commit
that referenced
this pull request
Dec 5, 2025
* Initial plan * Fix: Skip nested SelectExpr interceptor generation and generate DTOs with correct names Co-authored-by: arika0093 <[email protected]> * Fix: Address code review - move global:: prefix removal before class name extraction Co-authored-by: arika0093 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: arika0093 <[email protected]> (cherry picked from commit 8a370f8)
Merged
arika0093
added a commit
that referenced
this pull request
Dec 5, 2025
* chore: add permissions for changelog generation (cherry picked from commit 46e133a) * chore: update changelog for release (cherry picked from commit b6a6f17) * Fix type references in README for DTOs (cherry picked from commit 405d76b) * feat: add changelog generation step to release workflow (cherry picked from commit dd72ff4) * docs: add comparison section with other mapping libraries in README (cherry picked from commit 4441364) * docs: enhance README with detailed explanation of Linqraft's DTO generation feature and comparison with other libraries (cherry picked from commit c7523ff) * fix: correct spelling of "dependencies" in README files (cherry picked from commit 11ac12c) * docs: update README and nuget documentation to include new features for automatic DTO generation and calculated fields (cherry picked from commit 44f3bec) * docs: refine README overview to clarify Linqraft's features and eliminate redundancy (cherry picked from commit f272837) * Add AutoMapper, Mapperly, Mapster, and Facet to benchmark (#209) * Initial plan * Add AutoMapper, Mapperly, Mapster, and Facet to benchmark Co-authored-by: arika0093 <[email protected]> * Fix Mapperly warnings by ignoring unmapped source members Co-authored-by: arika0093 <[email protected]> * Fix Facet benchmark to use standard NestedFacets pattern for proper DTO mapping Co-authored-by: arika0093 <[email protected]> * refactor: update benchmark descriptions and set baseline for Linqraft Auto-Generated DTO --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: arika0093 <[email protected]> Co-authored-by: Arika Ishinami <[email protected]> (cherry picked from commit 0916634) * Fix nested SelectExpr generation - convert inner SelectExpr to Select (#208) * Initial plan * Add support for nested SelectExpr - convert inner SelectExpr to Select Co-authored-by: arika0093 <[email protected]> * Refactor: Extract shared helper for Select expression generation Co-authored-by: arika0093 <[email protected]> * Address PR feedback: unify methods, use record class for LINQ info, extract explicit DTO type from syntax Co-authored-by: arika0093 <[email protected]> * Address PR feedback: rename test file, use SelectExpr with explicit DTO types, verify nested namespace, update record syntax, simplify code Co-authored-by: arika0093 <[email protected]> * Improve null safety: add explicit null coalescing for propertyType Co-authored-by: arika0093 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: arika0093 <[email protected]> (cherry picked from commit 348f441) * docs: update FAQ section in README to clarify Linqraft's compatibility with LINQ providers (cherry picked from commit 24db040) * fix: add playground CSS file to .gitignore (cherry picked from commit 9c9740c) * refactor: streamline template creation and remove unused methods (cherry picked from commit 2d08f8e) * chore: remove unused tailwind CSS file from playground (cherry picked from commit 73e74c0) * docs: update FAQ to clarify Linqraft's compatibility with LINQ providers (cherry picked from commit 9773b53) * chore: update CI workflows for .NET build and test with multi-platform support (cherry picked from commit d3fbfc7) * chore: Update target frameworks and add build error suppression (#210) * fix: add SuppressTfmSupportBuildErrors property to Directory.Build.props * I207 test only run .NET 9 or later temporary * fix: remove .NET 6.0 from target frameworks in CI workflow * fix: correct property name in NestedSelectExpr test for clarity (cherry picked from commit c1bb6cf) * docs: clarify usage of Linqraft for generating shared DTOs from OpenAPI Schema (cherry picked from commit 400daf8) * docs: add collapsible section for available MSBuild properties in README (cherry picked from commit b9fdff6) * docs: add clarification on .csproj package reference for Linqraft installation (cherry picked from commit d67e521) * docs: improve clarity in reverse conversion explanation in README (cherry picked from commit 0add9bf) * Fix nested SelectExpr interceptor generation (#213) * Initial plan * Fix: Skip nested SelectExpr interceptor generation and generate DTOs with correct names Co-authored-by: arika0093 <[email protected]> * Fix: Address code review - move global:: prefix removal before class name extraction Co-authored-by: arika0093 <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: arika0093 <[email protected]> (cherry picked from commit 8a370f8) * docs: clarify target frameworks setup for Windows in CI workflow (cherry picked from commit 1cfba41) --------- Co-authored-by: arika0093 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: arika0093 <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
SelectExpris used inside anotherSelectExpr, the generator was incorrectly producing a separate interceptor and DTO class for the inner call. The innerSelectExprshould only be converted to a regularSelectby the outer one—no separate interceptor needed.Changes
SelectExprGenerator.cs: AddedIsNestedInsideAnotherSelectExprto skip interceptor generation for nestedSelectExprinvocationsSelectExprInfoExplicitDto.cs: When generating DTOs for nested structures, use the explicit type name from innerSelectExpr<TIn, TResult>rather than auto-generating a hash-based name; skip hash-namespace placement for these explicit DTOsResult
ItemDto) placed in user namespaceSelect) still use hash namespaceLinqraftGenerated_*namespacesOriginal prompt
This section details on the original issue you should resolve
<issue_title>bug: In nested SelectExpr, interceptors for the inner SelectExpr are generated incorrectly.</issue_title>
<issue_description>### Minimal Reproducible Example
Generated Output