Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the source generator and build configuration to better handle differences between Roslyn versions (notably around C# 14 extension members) and to avoid newer language/library constructs that break older builds, improving overall net8.0-targeted compatibility.
Changes:
- Adds
ROSLYN_5_0_OR_LATER-gated code paths for C# 14 extension-member handling (and safe skipping when unsupported). - Introduces
RoslynAnalyzerVersionauto-detection to select appropriateMicrosoft.CodeAnalysis.*package versions. - Replaces collection-expression-based
ImmutableArrayinitializations withImmutableArray.Create(...)/.ToImmutableArray().
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/EntityFrameworkCore.Projectables.Generator/SyntaxRewriters/ExpressionSyntaxRewriter.cs | Guards extension-parameter identifier rewriting behind ROSLYN_5_0_OR_LATER. |
| src/EntityFrameworkCore.Projectables.Generator/ProjectionExpressionGenerator.cs | Adds pre-Roslyn-5 guards to skip unsupported member containers; adjusts registry parameter-type collection. |
| src/EntityFrameworkCore.Projectables.Generator/Interpretation/ProjectableInterpreter.cs | Makes extension-member detection conditional on Roslyn 5+ APIs. |
| src/EntityFrameworkCore.Projectables.Generator/Interpretation/ProjectableInterpreter.MemberBodyResolver.cs | Guards extension-block logic behind Roslyn 5+ and provides safe fallback behavior. |
| src/EntityFrameworkCore.Projectables.Generator/Interpretation/ProjectableInterpreter.Helpers.cs | No-ops extension-block type-parameter promotion when Roslyn 5+ APIs aren’t available. |
| src/EntityFrameworkCore.Projectables.Generator/Interpretation/ProjectableInterpreter.BodyProcessors.cs | Makes extension-member detection conditional on Roslyn 5+ APIs. |
| src/EntityFrameworkCore.Projectables.Generator/EntityFrameworkCore.Projectables.Generator.csproj | Defines ROSLYN_5_0_OR_LATER when building with .NET SDK 10+. |
| src/EntityFrameworkCore.Projectables.CodeFixes/NullConditionalRewriteUnsupportedCodeFixProvider.cs | Avoids collection expression for FixableDiagnosticIds. |
| src/EntityFrameworkCore.Projectables.CodeFixes/MissingParameterlessConstructorCodeFixProvider.cs | Avoids collection expression for FixableDiagnosticIds. |
| src/EntityFrameworkCore.Projectables.CodeFixes/FactoryMethodToCtorCodeFixProvider.cs | Avoids collection expression for FixableDiagnosticIds. |
| src/EntityFrameworkCore.Projectables.CodeFixes/BlockBodyExperimentalCodeFixProvider.cs | Avoids collection expression for FixableDiagnosticIds. |
| Directory.Packages.props | Uses $(RoslynAnalyzerVersion) for Roslyn package versions; adds a fallback value. |
| Directory.Build.props | Auto-detects RoslynAnalyzerVersion from SDK major version. |
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
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.
No description provided.