-
-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Update target frameworks and add build error suppression #210
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
WalkthroughRemoves .NET 6.0 from CI/test TFMs and the workflow dotnet-version matrix, adds a test MSBuild property to suppress TFM build errors, and nests test-data classes inside a test class with a NET9_0_OR_GREATER compile guard and minor formatting changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.github/workflows/test-strict.yaml(1 hunks)tests/Directory.Build.props(1 hunks)tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs(6 hunks)
🧰 Additional context used
🧠 Learnings (4)
📚 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: Always perform a clean build to avoid stale generator caches; run: `dotnet clean && dotnet build --no-incremental`
Applied to files:
.github/workflows/test-strict.yaml
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
🧬 Code graph analysis (1)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs (1)
src/Linqraft.Core/SelectExprInfo.cs (2)
List(85-85)List(146-162)
🔇 Additional comments (2)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs (1)
55-56: Update or remove the outdated comment explaining the .NET 9 guard.The comment states "reason is unknown," but the commit history shows this guard was explicitly marked as "temporary" (commit 32e88b6, Dec 5, 2025). The discrepancy between the code comment and commit message suggests either the comment wasn't updated or the underlying issue remains unclear.
Either clarify the comment to reference that this is a temporary limitation pending resolution of nested SelectExpr generation issues, or remove the guard if the underlying problem has been resolved. If this guard is intended to remain long-term, document why nested SelectExpr requires .NET 9+ (e.g., OverloadResolutionPriorityAttribute availability or runtime differences).
tests/Directory.Build.props (1)
10-10: No changes needed. TheSuppressTfmSupportBuildErrorsandSuppressTfmSupportBuildWarningsproperties are intentional and necessary for this multi-target testing configuration.The tests are deliberately built against multiple frameworks (net10.0, net8.0, and net48 on Windows) as seen in the test-strict.yaml workflow. When testing newer .NET features against older frameworks, these errors and warnings are expected. The PolySharp dependency (v1.*) is included precisely to provide polyfills for newer language features on older frameworks. Both suppressions are standard practice for multi-target .NET projects and are not masking real compatibility issues—they are managing expected cross-version compatibility scenarios.
| steps: | ||
| - name: Set Target Frameworks (Unix) | ||
| run: echo 'TFMS=net10.0;net8.0;net6.0' >> $GITHUB_ENV | ||
| run: echo 'TFMS=net10.0;net8.0' >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Find all .csproj files and check target frameworks
echo "=== Searching for .csproj files ==="
fd -e csproj . --type f
echo ""
echo "=== Library Target Frameworks ==="
fd -e csproj . --exec grep -H "TargetFramework" {} \;
echo ""
echo "=== Searching for net6.0 references ==="
rg -n "net6\.?0" --type xml
echo ""
echo "=== Checking documentation files ==="
fd -e md . --type f -path "*README*" -o -path "*CHANGELOG*" | head -20Repository: arika0093/Linqraft
Length of output: 1714
🌐 Web query:
.NET 6.0 end of life support date
💡 Result:
.NET 6.0 reached end of support on November 12, 2024. [1][2]
Sources:
- Microsoft lifecycle (.NET 6.0 end date: Nov 12, 2024). [1]
- .NET Blog announcement (LTS, 36-month support ending Nov 12, 2024). [2]
🏁 Script executed:
#!/bin/bash
# Read the main library .csproj files
echo "=== src/Linqraft/Linqraft.csproj ==="
cat src/Linqraft/Linqraft.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== src/Linqraft.Core/Linqraft.Core.csproj ==="
cat src/Linqraft.Core/Linqraft.Core.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== src/Linqraft.Analyzer/Linqraft.Analyzer.csproj ==="
cat src/Linqraft.Analyzer/Linqraft.Analyzer.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj ==="
cat src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== Searching for CHANGELOG and documentation ==="
fd -e md . --type f | grep -i -E "(changelog|history|releases|breaking)" | head -10
echo ""
echo "=== Check for README.md ==="
fd README.md -type fRepository: arika0093/Linqraft
Length of output: 553
🏁 Script executed:
#!/bin/bash
echo "=== src/Linqraft/Linqraft.csproj (first 50 lines) ==="
head -50 src/Linqraft/Linqraft.csproj
echo ""
echo "=== CHANGELOG.md ==="
cat CHANGELOG.md
echo ""
echo "=== Check git diff or recent changes in test-strict.yaml ==="
git log -1 --oneline -- .github/workflows/test-strict.yamlRepository: arika0093/Linqraft
Length of output: 21166
🏁 Script executed:
#!/bin/bash
echo "=== src/Linqraft.Core/Linqraft.Core.csproj ==="
cat src/Linqraft.Core/Linqraft.Core.csproj
echo ""
echo "=== src/Linqraft.Analyzer/Linqraft.Analyzer.csproj ==="
cat src/Linqraft.Analyzer/Linqraft.Analyzer.csproj
echo ""
echo "=== src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj ==="
cat src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csprojRepository: arika0093/Linqraft
Length of output: 4401
🏁 Script executed:
cat Directory.Build.props | head -100Repository: arika0093/Linqraft
Length of output: 115
Document .NET 6.0 removal as a breaking change if the library no longer supports it.
The test matrix removal of .NET 6.0 aligns with its end-of-life status (November 12, 2024), but the CHANGELOG for v0.6.0 does not document this as a breaking change despite including other [breaking] entries. If .NET 6.0 support has been removed from the library's target frameworks, this must be explicitly documented in the release notes to inform users of the new minimum supported .NET version.
Ensure:
- A
[breaking]entry is added to CHANGELOG documenting the minimum .NET version change - Users can clearly identify which versions support .NET 6.0 (if needed for backwards compatibility)
- The library's project files are consistent with the test matrix (verify no net6.0 in TargetFrameworks)
Also applies to: 21-21
🤖 Prompt for AI Agents
.github/workflows/test-strict.yaml lines 17-17: The CI matrix was changed to
remove net6.0 (setting TFMS=net10.0;net8.0) but the v0.6.0 CHANGELOG doesn't
document removal of .NET 6.0 as a breaking change; update the release notes with
a clear “[breaking]” entry stating that the minimum supported .NET version moved
from .NET 6.0 to .NET 8.0 (or whatever the new minimum is), include guidance
about which published versions still support .NET 6.0, and then verify and, if
necessary, update project TargetFramework(s)/TargetFrameworks to remove net6.0
so they match the test matrix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The library side works on .NET6 (and older versions), but simply because version management of the test library is complicated, tests are run only on .NET8 and above.
(For example, xunit.runner.visualstudio does not work well with v3 in the case of .NET6)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Verify that library project files still target net6.0
echo "=== Main library target frameworks ==="
cat src/Linqraft/Linqraft.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== Core library target frameworks ==="
cat src/Linqraft.Core/Linqraft.Core.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== Analyzer target frameworks ==="
cat src/Linqraft.Analyzer/Linqraft.Analyzer.csproj | grep -A 2 "TargetFramework"
echo ""
echo "=== SourceGenerator target frameworks ==="
cat src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj | grep -A 2 "TargetFramework"
Length of output: 157
🏁 Script executed:
#!/bin/bash
# Get full content of library project files
echo "=== Main library (Linqraft.csproj) ==="
cat src/Linqraft/Linqraft.csproj
echo ""
echo "=== Core library (Linqraft.Core.csproj) ==="
cat src/Linqraft.Core/Linqraft.Core.csproj
echo ""
echo "=== Analyzer (Linqraft.Analyzer.csproj) ==="
cat src/Linqraft.Analyzer/Linqraft.Analyzer.csproj
echo ""
echo "=== SourceGenerator (Linqraft.SourceGenerator.csproj) ==="
cat src/Linqraft.SourceGenerator/Linqraft.SourceGenerator.csproj
Length of output: 5580
🏁 Script executed:
#!/bin/bash
# Check Directory.Build.props files to see the target frameworks
echo "=== Root Directory.Build.props ==="
cat Directory.Build.props
echo ""
echo "=== src/Directory.Build.props (if exists) ==="
if [ -f src/Directory.Build.props ]; then
cat src/Directory.Build.props
else
echo "File does not exist"
fi
echo ""
echo "=== Check for any other Directory.Build.props files ==="
fd -H "Directory.Build.props" --type f
Length of output: 1681
@arika0093 Thank you for the clarification! You're absolutely right. I can confirm that the library projects target netstandard2.0 (as defined in src/Directory.Build.props), which means they remain fully compatible with .NET 6.0 and older versions.
The test matrix change only affects which .NET versions are used to run the tests, not the library's compatibility. This is indeed NOT a breaking change for consumers of the library.
I apologize for the confusion in my initial comment. The CHANGELOG does not need to document this as a breaking change since it's purely a test infrastructure simplification.
✏️ Learnings added
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.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs (1)
55-56: NET 9 guard is reasonable; consider clarifying the commentGuarding this test with
#if NET9_0_OR_GREATERaligns with the intent to run it only where the necessary TFM/interceptor support exists. The warning comment, though, is a bit vague (“reason is unknown…”). Consider briefly stating the concrete symptom (e.g., failing behavior or build issue) or linking to a tracking issue so future readers know why the test is gated.Also applies to: 131-131
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs(3 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
📚 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:
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs
🧬 Code graph analysis (1)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs (1)
src/Linqraft.Core/SelectExprInfo.cs (2)
List(85-85)List(146-162)
🔇 Additional comments (3)
tests/Linqraft.Tests/Issue207_NestedSelectExprTest.cs (3)
35-35: Formatting-only change toSubItemsinitialization looks goodUsing a single-line collection expression for
SubItemskeeps semantics identical and is perfectly fine here.
125-127: Line-wrapped reflection call is fineSplitting the chained
GetGenericArguments().FirstOrDefault()call across lines is a readability change only; behavior remains the same.
133-152: Nesting test data classes inside the test is a good scoping improvementMoving
NestedEntity207,NestedItem207, andNestedSubItem207insideIssue207_NestedSelectExprTestasinternalnested classes keeps the test data tightly scoped to this test and avoids polluting the test assembly’s namespace. Given they are only used within this test, this structural change is appropriate.
* 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)
* 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 <4524647+arika0093@users.noreply.github.com> * Fix Mapperly warnings by ignoring unmapped source members Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com> * Fix Facet benchmark to use standard NestedFacets pattern for proper DTO mapping Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com> * refactor: update benchmark descriptions and set baseline for Linqraft Auto-Generated DTO --------- 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 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 <4524647+arika0093@users.noreply.github.com> * Refactor: Extract shared helper for Select expression generation Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com> * Address PR feedback: unify methods, use record class for LINQ info, extract explicit DTO type from syntax Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com> * Address PR feedback: rename test file, use SelectExpr with explicit DTO types, verify nested namespace, update record syntax, simplify code Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com> * Improve null safety: add explicit null coalescing for propertyType 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 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 <4524647+arika0093@users.noreply.github.com> * Fix: Address code review - move global:: prefix removal before class name extraction 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 8a370f8) * docs: clarify target frameworks setup for Windows in CI workflow (cherry picked from commit 1cfba41) --------- Co-authored-by: arika0093 <arika0093@users.noreply.github.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: arika0093 <4524647+arika0093@users.noreply.github.com>
Add the
SuppressTfmSupportBuildErrorsproperty to suppress build errors related to target framework support. Remove .NET 6.0 from the target frameworks in the CI workflow and ensure tests only run on .NET 9 or later.Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.