Skip to content

Conversation

@arika0093
Copy link
Owner

@arika0093 arika0093 commented Dec 7, 2025

Summary by CodeRabbit

  • Documentation
    • Restructured README into a streamlined Quick Start, installation-focused flow, and consolidated usage guidance
    • Added a comprehensive docs suite: Installation, Usage Patterns, FAQ, Performance, Library Comparison, and feature guides (array nullability, auto-generated comments, local-variable capture, nested DTO naming, partial classes, global properties)
    • Improved navigation, shorter targeted examples, and links to detailed guides for deeper customization and examples

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Dec 7, 2025

Warning

Rate limit exceeded

@arika0093 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 20 minutes and 35 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between df3213a and 5ed3f7f.

📒 Files selected for processing (1)
  • README.md (4 hunks)

Walkthrough

The repository's documentation was reorganized: README.md was streamlined into a Quick Start and installation-focused layout, and a new docs/library collection (installation, usage patterns, feature guides, comparisons, performance, FAQ, and global properties) was added. No code or public API changes.

Changes

Cohort / File(s) Change Summary
README restructuring
README.md
Rewrote README to a concise Quick Start and installation-oriented narrative, removed long inline setup and examples, and added navigation links to the new documentation pages.
Installation & setup
docs/library/installation.md
New installation and prerequisites guide (C#/.NET requirements, NuGet install commands, csproj snippets, PolySharp notes, next steps).
Usage patterns
docs/library/usage-patterns.md
New guide describing Anonymous, Explicit DTO, and Pre-existing DTO patterns with examples, generated snippets, IEnumerable usage, and extension via partial classes.
Feature guides
docs/library/array-nullability.md, docs/library/auto-generated-comments.md, docs/library/local-variable-capture.md, docs/library/nested-dto-naming.md, docs/library/partial-classes.md
Five new feature docs covering array nullability removal rules and config, auto-generated XML comments and config, local variable capture pattern and analyzer support, nested DTO naming strategies and options, and extending generated partial DTOs.
Configuration & global properties
docs/library/global-properties.md
New reference documenting MSBuild/global properties (LinqraftGlobalNamespace, LinqraftRecordGenerate, LinqraftPropertyAccessor, LinqraftHasRequired, LinqraftCommentOutput, LinqraftArrayNullabilityRemoval, LinqraftNestedDtoUseHashNamespace) with examples and inspection tips.
Reference & comparison
docs/library/library-comparison.md, docs/library/performance.md, docs/library/faq.md
Three new reference docs: library comparison (AutoMapper, Mapster, Mapperly, Facet, Linqraft), performance/benchmark results and methodology, and an FAQ covering common usage and generated code access.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • Focus review on cross-reference accuracy between README and docs and quick syntax checks of embedded code examples.

Poem

🐰 Hop along through docs so neat,
Features gathered, all complete!
From quick-starts bright to patterns wise,
Knowledge blooms before our eyes!
Installation guides now show the way—
Welcome, travelers, to learn today! 🌟

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective: separating README contents into individual documentation files across docs/library/.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@arika0093 arika0093 marked this pull request as ready for review December 7, 2025 14:53
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2a039c0 and c994e89.

📒 Files selected for processing (12)
  • README.md (4 hunks)
  • docs/library/array-nullability.md (1 hunks)
  • docs/library/auto-generated-comments.md (1 hunks)
  • docs/library/faq.md (1 hunks)
  • docs/library/global-properties.md (1 hunks)
  • docs/library/installation.md (1 hunks)
  • docs/library/library-comparison.md (1 hunks)
  • docs/library/local-variable-capture.md (1 hunks)
  • docs/library/nested-dto-naming.md (1 hunks)
  • docs/library/partial-classes.md (1 hunks)
  • docs/library/performance.md (1 hunks)
  • docs/library/usage-patterns.md (1 hunks)
🧰 Additional context used
🧠 Learnings (11)
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*Helper.cs : Document complex helper methods with XML comments

Applied to files:

  • docs/library/partial-classes.md
  • docs/library/faq.md
  • docs/library/usage-patterns.md
  • README.md
  • docs/library/auto-generated-comments.md
  • docs/library/library-comparison.md
  • docs/library/installation.md
  • docs/library/global-properties.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Add test cases for source generators to `tests/Linqraft.Tests/`

Applied to files:

  • docs/library/performance.md
  • docs/library/faq.md
  • docs/library/usage-patterns.md
  • README.md
  • docs/library/global-properties.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Add test cases for analyzers to `tests/Linqraft.Analyzer.Tests/`

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*.cs : Keep helper methods lightweight and focused; helper methods are called frequently during analysis

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft/DummyExpression.cs : Do not edit `DummyExpression.cs`; it serves only as a marker for the Source Generator

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.{Analyzer,Core}/**/*.cs : Always prefer semantic analysis over string matching; use `RoslynTypeHelper` instead of string-based type checking

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.{Analyzer,Core}/**/*.cs : Use `ISymbolEqualityComparer` for symbol comparisons in analyzer code

Applied to files:

  • README.md
  • docs/library/library-comparison.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*.cs : Cache expensive operations in helper methods when possible

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Analyzer/**/*Analyzer.cs : All new analyzers should inherit from `BaseLinqraftAnalyzer`

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/SyntaxHelpers/*.cs : Syntax helpers should be placed in `Linqraft.Core/SyntaxHelpers/` and named `*Helper.cs`

Applied to files:

  • README.md
📚 Learning: 2025-12-05T13:51:44.986Z
Learnt from: arika0093
Repo: arika0093/Linqraft PR: 210
File: .github/workflows/test-strict.yaml:17-17
Timestamp: 2025-12-05T13:51:44.986Z
Learning: In the Linqraft repository, the library projects (src/) target netstandard2.0, which maintains compatibility with .NET 6.0 and older versions. The test matrix in .github/workflows/test-strict.yaml specifies which .NET versions are used to run tests, not the library's compatibility. Changes to the test matrix (TFMS variable) do not affect library compatibility and should not be treated as breaking changes.

Applied to files:

  • docs/library/library-comparison.md
  • docs/library/installation.md
🪛 markdownlint-cli2 (0.18.1)
docs/library/faq.md

129-129: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


145-145: Bare URL used

(MD034, no-bare-urls)

🔇 Additional comments (10)
README.md (3)

161-178: Approve README reorganization as navigation hub.

The restructuring successfully transforms the README from an extensive inline reference into a focused quick-start guide that directs users to detailed documentation. The layout is clean, the features are prominent, and navigation is clear. Cross-references to new docs are appropriately organized by category (Getting Started, Customization, Performance & Comparison, Help).


234-258: All documentation links in the README are correctly referenced and exist in the repository.

All 12 documentation files referenced in the Documentation section (lines 234–258) have been verified as present and properly formatted: installation.md, usage-patterns.md, local-variable-capture.md, array-nullability.md, partial-classes.md, nested-dto-naming.md, auto-generated-comments.md, global-properties.md, performance.md, library-comparison.md, faq.md, and docs/analyzers/README.md. No action required.

Likely an incorrect or invalid review comment.


232-232: Verify existence of referenced usage-patterns.md file.

Lines 232 and 239 reference ./docs/library/usage-patterns.md, but this file's existence cannot be confirmed without direct repository access. Ensure this file exists in the repository, along with other documentation files mentioned in the Documentation section (docs/library/faq.md, docs/library/performance.md, docs/library/partial-classes.md).

docs/library/installation.md (1)

59-60: Cross-reference to usage-patterns.md (pending verification).

The "Next Steps" section links to ./usage-patterns.md. Ensure this file exists, as it's also referenced in README.md. (This is the same file referenced elsewhere that needs verification.)

docs/library/local-variable-capture.md (1)

64-64: Verify image asset exists.

The documentation references an image at ../../assets/local-variable-capture-err.png (line 64). Ensure this asset file exists at the expected path relative to the docs folder structure.

docs/library/usage-patterns.md (1)

1-197: Comprehensive and well-structured usage patterns guide. The three patterns (Anonymous, Explicit DTO, Pre-existing DTO) are clearly differentiated with practical examples, generated code samples, and balanced pros/cons. The structure makes it easy for users to understand when to use each approach.

docs/library/performance.md (1)

1-44: Clear performance documentation with comprehensive benchmarks. The three key performance characteristics (compile-time code generation, native expression trees, zero dependencies) are well-explained. The benchmark table effectively compares Linqraft against popular mapping libraries, with clear methodology and environment details.

docs/library/partial-classes.md (1)

1-97: Practical guide to extending generated DTOs. The documentation clearly demonstrates how to use partial classes to add custom methods, implement interfaces, apply attributes, and control property accessibility. The generated code examples help readers understand what is auto-generated versus user-defined.

docs/library/faq.md (2)

160-165: Verify all referenced documentation files exist.

The FAQ references several documentation files for next steps. Ensure the following files exist in docs/library/:

  • installation.md
  • usage-patterns.md
  • customization.md
  • performance.md

Line 164 references customization.md—verify this file exists and is included in this PR.


38-89: Content quality is strong. The FAQ comprehensively covers general usage across LINQ providers, DTO usage in various contexts (API responses, services, tests), and provides two practical methods for accessing generated code. Examples are clear and well-contextualized.

arika0093 and others added 2 commits December 7, 2025 23:57
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
docs/library/faq.md (1)

129-138: Add language identifier to code block for proper markdown rendering.

The folder tree code block is missing a language identifier. This violates MD040 (fenced-code-language) and impacts rendering/accessibility.

-```
+```text
 YourProject/
 ├── Generated/
 │   ├── Linqraft.SourceGenerator/
 │   │   ├── SelectExpr_HASH1.g.cs
 │   │   ├── SelectExpr_HASH2.g.cs
 │   │   └── ...
 ├── Program.cs
 └── YourProject.csproj
-```
+```
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c994e89 and df3213a.

📒 Files selected for processing (2)
  • README.md (4 hunks)
  • docs/library/faq.md (1 hunks)
🧰 Additional context used
🧠 Learnings (11)
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Analyzer/**/*.cs : Use `TriviaHelper` for formatting to preserve whitespace, comments, and detect line endings for cross-platform compatibility

Applied to files:

  • docs/library/faq.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Add test cases for source generators to `tests/Linqraft.Tests/`

Applied to files:

  • docs/library/faq.md
  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Add test cases for analyzers to `tests/Linqraft.Analyzer.Tests/`

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*.cs : Keep helper methods lightweight and focused; helper methods are called frequently during analysis

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*Helper.cs : Document complex helper methods with XML comments

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft/DummyExpression.cs : Do not edit `DummyExpression.cs`; it serves only as a marker for the Source Generator

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.{Analyzer,Core}/**/*.cs : Always prefer semantic analysis over string matching; use `RoslynTypeHelper` instead of string-based type checking

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.{Analyzer,Core}/**/*.cs : Use `ISymbolEqualityComparer` for symbol comparisons in analyzer code

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/**/*.cs : Cache expensive operations in helper methods when possible

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Core/SyntaxHelpers/*.cs : Syntax helpers should be placed in `Linqraft.Core/SyntaxHelpers/` and named `*Helper.cs`

Applied to files:

  • README.md
📚 Learning: 2025-11-25T12:08:35.849Z
Learnt from: CR
Repo: arika0093/Linqraft PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-11-25T12:08:35.849Z
Learning: Applies to src/Linqraft.Analyzer/**/*Analyzer.cs : All new analyzers should inherit from `BaseLinqraftAnalyzer`

Applied to files:

  • README.md
🪛 markdownlint-cli2 (0.18.1)
docs/library/faq.md

129-129: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

@arika0093 arika0093 merged commit 29b0301 into main Dec 7, 2025
3 checks passed
@arika0093 arika0093 deleted the docs/separate-readme-contents branch December 7, 2025 15:04
arika0093 added a commit that referenced this pull request Dec 10, 2025
@arika0093 arika0093 mentioned this pull request Dec 10, 2025
arika0093 added a commit that referenced this pull request Dec 10, 2025
* Fix: Remove parent class nesting from implicit DTOs in hash namespaces (#219)

* Initial plan

* Add test for issue: implicit DTOs should not be nested in parent class when using hash namespace

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Fix: Implicit DTOs should not be nested in parent class when using hash namespace

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
(cherry picked from commit dd2d380)

* Fix nested SelectExpr inconsistency between playground and source generator (#221)

* Initial plan

* Add shared IsNestedInsideAnotherSelectExpr helper and use in playground and source generator

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Add comprehensive tests for nested SelectExpr consistency fix

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Remove tests for nested SelectExpr type verification

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
Co-authored-by: Arika Ishinami <delete0093@gmail.com>
(cherry picked from commit a25737e)

* docs: Add IntroductionSection component and improve accessibility (#223)

* feat: add IntroductionSection component for query-based DTO generation

* fix: add translate attribute to improve accessibility in playground components

* refactor: remove custom animation definitions from tailwind.css

(cherry picked from commit 2a039c0)

* Fix nested SelectExpr code generation: parent class qualification, array types, and comment verbosity (#222)

* Initial plan

* Initial analysis of nested SelectExpr issues

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Fix Issues 1 and 3 for nested SelectExpr - Issue 2 still in progress

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Fix Issue 2 - array property types now correctly include [] suffix

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Refactor array type detection into helper method per code review

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Address PR review comments: rename test file, remove qualifiers with partial declarations, improve comments, extract method

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Clarify that partial class declarations are required for nested DTO generation

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
(cherry picked from commit a163791)

* docs: separate README contents to other files (#224)

(cherry picked from commit 29b0301)

* Fix: set default value of settingsExpanded to false in Sidebar component

(cherry picked from commit a34d686)

* docs: add comprehensive documentation for Nested SelectExpr feature

(cherry picked from commit 97439c9)

* Revert "docs: add comprehensive documentation for Nested SelectExpr feature"

This reverts commit 97439c9.

(cherry picked from commit 755698c)

* docs: add Nested SelectExpr documentation for reusable DTOs (#225)

* docs: add Nested SelectExpr documentation for reusable DTOs

* docs: update Nested SelectExpr documentation with important notes and usage requirements

* upd

* Fix GitHub Issue link in nested-selectexpr.md

(cherry picked from commit 64b9787)

* fix: NestedSelectExprTest and update documentation (#229)

* Fix: update Issue207_NestedSelectExprTest to support partial classes and remove .NET 9 specific warnings

* Fix: update documentation for Nested SelectExpr to clarify beta status and remove .NET 9+ recommendation

(cherry picked from commit 1aa5ec7)

* Document explicit class naming for nested DTOs

Added section on explicit class naming in nested DTOs.

(cherry picked from commit 1ddc079)

* Enhance library comparison with GitHub stars

Updated the library comparison table to include GitHub repository star counts for each library.

(cherry picked from commit d875f80)

* Update Docs link to point to library directory

(cherry picked from commit 59498e4)

* Refactor Order example to use records and facets

Updated the example to use records and facets for Order and OrderChild.

(cherry picked from commit c66f8b8)

* Add pre-built expression tree caching for IQueryable operations (#234)

* Initial plan

* Add pre-built expression tree configuration and implementation

- Added LinqraftUsePrebuildExpression configuration option (default: false)
- Created ExpressionTreeBuilder helper class for generating cached expression fields
- Updated SelectExprInfoAnonymous to use pre-built expressions when enabled
- Updated SelectExprInfoNamed to use pre-built expressions when enabled
- Updated SelectExprInfoExplicitDto to use pre-built expressions when enabled
- Pre-built expressions only apply to IQueryable (not IEnumerable)
- Pre-built expressions are disabled when captures are used

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Refactor static field generation to class level

- Moved static field generation from method body to class level
- Added GenerateStaticFields() virtual method to SelectExprInfo
- Updated SelectExprGroups to collect and pass static fields
- Updated GenerateSourceCodeSnippets to output static fields before methods
- Fixed null reference warning in SelectExprGroups

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Complete pre-built expression tree implementation

- Fixed CompilerVisibleProperty list to include LinqraftUsePrebuildExpression
- Anonymous types cannot use pre-built expressions (result type is compiler-generated)
- Pre-built expressions only work for named/predefined/explicit DTO types
- Added comprehensive tests for IQueryable with different DTO patterns
- All tests passing with pre-built expressions enabled

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Add LinqraftUsePrebuildExpression to all CompilerVisibleProperty lists

- Updated examples/Directory.Build.props with new configuration property
- Fixed playground/Services/CodeGenerationService.cs to use updated API signature
- All projects now support the new LinqraftUsePrebuildExpression configuration

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Add LinqraftUsePrebuildExpression property to project files

* Fix code generation issues per review feedback

- Use 'var' instead of explicit type in expression initialization (line 93)
- Remove unnecessary '!' null-forgiving operator when fieldName is not null
- Fix indentation of generated multi-line lambda expressions
- Use explicit Expression<> type instead of 'as' operator (lambdas cannot use 'as')

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Refactor to use direct expression initialization per review feedback

- Updated documentation in global-properties.md for LinqraftUsePrebuildExpression
- Added note about captures not supporting pre-built expressions
- Refactored ExpressionTreeBuilder to directly initialize expression fields (no lazy init)
- Removed GenerateNamedExpressionTreeInitialization and GenerateAnonymousExpressionTreeInitialization
- Expression trees now initialized at field declaration, eliminating null checks
- Updated SelectExprInfoNamed and SelectExprInfoExplicitDto to use new approach
- Added test for multiple DTO types to verify pre-built expressions work correctly
- All 6 tests passing

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Address final review feedback: readonly, indentation, remove test, add playground toggle

- Added 'readonly' keyword to static expression fields for immutability
- Fixed indentation: ensured proper line ending with AppendLine for multi-line expressions
- Deleted Linqraft.Tests.Configuration project as requested
- Removed project reference from Linqraft.slnx
- Added toggle for LinqraftUsePrebuildExpression in playground Settings section
- All tests passing (130/130)

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* revert: reset Linqraft.Tests.Configuration

* Fix indentation in BuildExprCodeSnippets for static fields

* Add static fields generation to expression code snippets

* formatt

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
Co-authored-by: Arika Ishinami <delete0093@gmail.com>
(cherry picked from commit 1761753)

* chore(deps): bump stefanzweifel/git-auto-commit-action from 4 to 7 (#236)

Bumps [stefanzweifel/git-auto-commit-action](https://github.com/stefanzweifel/git-auto-commit-action) from 4 to 7.
- [Release notes](https://github.com/stefanzweifel/git-auto-commit-action/releases)
- [Changelog](https://github.com/stefanzweifel/git-auto-commit-action/blob/master/CHANGELOG.md)
- [Commits](stefanzweifel/git-auto-commit-action@v4...v7)

---
updated-dependencies:
- dependency-name: stefanzweifel/git-auto-commit-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 107f2d2)

* Bump AutoMapper from 15.1.0 to 16.0.0 (#237)

---
updated-dependencies:
- dependency-name: AutoMapper
  dependency-version: 16.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
(cherry picked from commit 623b9fa)

* feat: optimize DTO generation and performance documentation (#235)

* Refactor GenerateDtoClasses method for improved readability and performance

* Add caching for pre-built expressions in SelectExprInfoNamed

* Refactor nullable access conversion to simplify default value handling

* Update performance documentation to clarify benchmarks and improve readability

* Update README to simplify performance and FAQ sections

* Fix nullable type handling in GetDefaultValueForType method

(cherry picked from commit 54005a1)

* formatted

(cherry picked from commit 11122cb)

* chore: update commit message format for csharpier workflow

(cherry picked from commit 735eb9f)

* playground: enable ScrollBeyondLastLine and update StickyScroll options in EditorPane and PreviewPane

(cherry picked from commit 9bc3057)

* Deduplicate DTO class definitions globally across all generated files (#240)

* Initial plan

* Fix duplicate ChildDto generation for same-shaped nested DTOs in Select expressions

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Improve code comments based on review feedback

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Fix duplicate DTO class definitions by deduplicating at generation point

Reverted changes to DtoProperty.cs and implemented deduplication in
GenerateSourceCodeSnippets.BuildDtoCodeSnippetsGroupedByNamespace instead.
This ensures DTOs with the same FullName (namespace + class name) are only
generated once, even when used across multiple SelectExpr calls.

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Implement global DTO deduplication across all files

- Collect all DTOs from all SelectExpr groups
- Deduplicate globally by FullName before generation
- Generate all DTOs in a single shared GeneratedDtos.g.cs file
- Each expression group file now only contains expression methods
- This ensures DTOs are not duplicated even when used across different files

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

* Refactor DTO generation based on code review feedback

- Moved global DTO deduplication logic to GenerateSourceCodeSnippets.BuildGlobalDtoCodeSnippet
- Separated SelectExprGroups.GenerateCode into two methods: GenerateCode and GenerateCodeWithoutDtos
- Made GenerateCommentHeaderPart and GenerateHeaderFlagsPart public for cross-namespace use
- Renamed test files to Issue239_* pattern for clarity
- Updated playground CodeGenerationService to use new global DTO deduplication
- Fixed null reference warning in playground service

Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
(cherry picked from commit 16b287e)

* refactor: DTO handling and improve code clarity (#216)

* refactor: improve code structure and add documentation for auto-generated DTO attribute

* refactor: rename ExportAll method to ExportAllConstantSnippets for clarity

* refactor: replace hardcoded DTO attributes with a dedicated method for better maintainability

* refactor: add EditorBrowsable attribute to internal DTO attributes for better visibility control

(cherry picked from commit ae2ba5f)

* fix

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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.

2 participants