Skip to content

Commit 486888a

Browse files
authored
Merge pull request #185 from EFNext/feature/update-deps
Update deps
2 parents 5c27dc1 + 9d2ef93 commit 486888a

60 files changed

Lines changed: 119 additions & 180 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/copilot-instructions.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,16 @@ samples/ # Readme sample project
2323

2424
## Build & SDK
2525

26-
| Setting | Value |
27-
|---|---|
28-
| .NET SDK | 10.0.x (`global.json`, `rollForward: latestMinor`) |
29-
| Target frameworks | `net8.0` + `net10.0` (library); `net8.0;net9.0;net10.0` (functional tests) |
30-
| C# language version | `12.0` on `net8.0`, `14.0` on `net10.0` |
31-
| Nullable | `enable` |
32-
| Implicit usings | `enable` |
33-
| Warnings as errors | `TreatWarningsAsErrors = true`**zero warnings allowed** |
34-
| Suppressed warning | `CS1591` (missing XML doc) |
35-
| Assembly signing | `Key.snk` (src projects only) |
26+
| Setting | Value |
27+
|---------------------|----------------------------------------------------------------------------|
28+
| .NET SDK | 10.0.x (`global.json`, `rollForward: latestMinor`) |
29+
| Target frameworks | `net8.0` + `net10.0` (library); `net8.0;net9.0;net10.0` (functional tests) |
30+
| C# language version | `12.0` on `net8.0`, `14.0` on `net10.0` |
31+
| Nullable | `enable` |
32+
| Implicit usings | `enable` |
33+
| Warnings as errors | `TreatWarningsAsErrors = true`**zero warnings allowed** |
34+
| Suppressed warning | `CS1591` (missing XML doc) |
35+
| Assembly signing | `Key.snk` (src projects only) |
3636

3737
The generator project targets `netstandard2.0` only (Roslyn analyzers requirement).
3838

@@ -98,18 +98,18 @@ Use file-scoped namespaces (`namespace Foo;`) in all new files **except** when t
9898
## Testing Guidelines
9999

100100
### Test projects and frameworks
101-
| Project | Framework | Library |
102-
|---|---|---|
103-
| `Generator.Tests` | xUnit 2 | `Verify.Xunit` snapshot testing |
104-
| `FunctionalTests` | xUnit 2 + ScenarioTests | `Verify.Xunit` + `Microsoft.EntityFrameworkCore.SqlServer` |
105-
| `Tests` | xUnit 2 | plain assertions |
101+
| Project | Framework | Library |
102+
|-------------------|--------------------------|--------------------------------------------------------------|
103+
| `Generator.Tests` | xUnit v3 | `Verify.XunitV3` snapshot testing for the code generator |
104+
| `CodeFixer.Tests` | xUnit v3 | `Verify.XunitV3` snapshot testing for the code fixes |
105+
| `FunctionalTests` | xUnit v3 + ScenarioTests | `Verify.XunitV3` + `Microsoft.EntityFrameworkCore.SqlServer` |
106+
| `Tests` | xUnit v3 | plain assertions |
106107

107-
### Verify.Xunit — snapshot testing
108+
### Verify.XunitV3 — snapshot testing
108109

109110
**Every test that calls `Verifier.Verify(...)` must:**
110111
1. Return `Task` (not `void`)
111-
2. Have `[UsesVerify]` on the class
112-
3. Have a corresponding `.verified.txt` file committed alongside the test file
112+
2. Have a corresponding `.verified.txt` file committed alongside the test file
113113

114114
**Naming convention for verified files:**
115115
`{ClassName}.{MethodName}.verified.txt`
@@ -223,17 +223,17 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
223223

224224
### Key files in `EntityFrameworkCore.Projectables.Generator`
225225

226-
| File | Responsibility |
227-
|---|---|
228-
| `ProjectionExpressionGenerator.cs` | `IIncrementalGenerator` entry point — wires up the pipeline |
229-
| `ProjectableInterpreter.cs` (+ partials) | Converts a `MemberDeclarationSyntax` into a `ProjectableDescriptor` |
230-
| `ExpressionSyntaxRewriter.cs` (+ partials) | Rewrites expressions: null-conditionals, enum expansions, switch expressions |
231-
| `DeclarationSyntaxRewriter.cs` | Rewrites declarations (fully-qualified names, etc.) |
232-
| `BlockStatementConverter.cs` | Converts block-bodied methods to expression trees |
233-
| `ProjectableDescriptor.cs` | Pure data record describing a projectable member |
234-
| `ProjectableAttributeData.cs` | Serializable snapshot of `[Projectable]` attribute values (no live Roslyn objects) |
235-
| `ProjectionRegistryEmitter.cs` | Emits `ProjectionRegistry.g.cs` |
236-
| `Diagnostics.cs` | All `DiagnosticDescriptor` constants (EFP0001–EFP0009) |
226+
| File | Responsibility |
227+
|--------------------------------------------|------------------------------------------------------------------------------------|
228+
| `ProjectionExpressionGenerator.cs` | `IIncrementalGenerator` entry point — wires up the pipeline |
229+
| `ProjectableInterpreter.cs` (+ partials) | Converts a `MemberDeclarationSyntax` into a `ProjectableDescriptor` |
230+
| `ExpressionSyntaxRewriter.cs` (+ partials) | Rewrites expressions: null-conditionals, enum expansions, switch expressions |
231+
| `DeclarationSyntaxRewriter.cs` | Rewrites declarations (fully-qualified names, etc.) |
232+
| `BlockStatementConverter.cs` | Converts block-bodied methods to expression trees |
233+
| `ProjectableDescriptor.cs` | Pure data record describing a projectable member |
234+
| `ProjectableAttributeData.cs` | Serializable snapshot of `[Projectable]` attribute values (no live Roslyn objects) |
235+
| `ProjectionRegistryEmitter.cs` | Emits `ProjectionRegistry.g.cs` |
236+
| `Diagnostics.cs` | All `DiagnosticDescriptor` constants (EFP0001–EFP0009) |
237237

238238
### Incremental generator rules
239239
- **Never capture live Roslyn objects** (`ISymbol`, `SemanticModel`, `Compilation`, `AttributeData`) in the incremental pipeline transforms — they break caching. Use `ProjectableAttributeData` (a plain struct) instead.
@@ -243,15 +243,15 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
243243

244244
## Diagnostics Reference
245245

246-
| ID | Severity | Title |
247-
|---|---|---|
248-
| EFP0001 | Warning | Block-bodied member support is experimental |
249-
| EFP0002 | Error | Null-conditional expression unsupported |
250-
| EFP0003 | Warning | Unsupported statement in block-bodied method |
251-
| EFP0004 | Error | Statement with side effects in block-bodied method |
252-
| EFP0005 | Warning | Potential side effect in block-bodied method |
253-
| EFP0006 | Error | Method/property should expose a body definition |
254-
| EFP0007 | Warning | Non-projectable method call in block body |
246+
| ID | Severity | Title |
247+
|---------|----------|----------------------------------------------------|
248+
| EFP0001 | Warning | Block-bodied member support is experimental |
249+
| EFP0002 | Error | Null-conditional expression unsupported |
250+
| EFP0003 | Warning | Unsupported statement in block-bodied method |
251+
| EFP0004 | Error | Statement with side effects in block-bodied method |
252+
| EFP0005 | Warning | Potential side effect in block-bodied method |
253+
| EFP0006 | Error | Method/property should expose a body definition |
254+
| EFP0007 | Warning | Non-projectable method call in block body |
255255

256256
---
257257

Directory.Packages.props

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@
66
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
77
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
88
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
9-
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.3" />
9+
<PackageVersion Include="Basic.Reference.Assemblies.Net80" Version="1.8.4" />
1010
</ItemGroup>
1111
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
1212
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
1313
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.0" />
1414
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
15-
<PackageVersion Include="Basic.Reference.Assemblies.Net90" Version="1.8.3" />
15+
<PackageVersion Include="Basic.Reference.Assemblies.Net90" Version="1.8.4" />
1616
</ItemGroup>
1717
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
1818
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="10.0.0" />
1919
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.0" />
2020
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.0" />
21-
<PackageVersion Include="Basic.Reference.Assemblies.Net100" Version="1.8.3" />
21+
<PackageVersion Include="Basic.Reference.Assemblies.Net100" Version="1.8.4" />
2222
</ItemGroup>
2323
<ItemGroup>
24-
<PackageVersion Include="BenchmarkDotNet" Version="0.14.0" />
25-
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
24+
<PackageVersion Include="BenchmarkDotNet" Version="0.15.8" />
25+
<PackageVersion Include="coverlet.collector" Version="8.0.1" />
2626
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
2727
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
2828
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="5.0.0" />
29-
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
30-
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
29+
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="5.3.0" />
30+
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.3.0" />
3131
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
32-
<PackageVersion Include="Verify.Xunit" Version="22.5.0" />
33-
<PackageVersion Include="xunit" Version="2.9.2" />
34-
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />
32+
<PackageVersion Include="Verify.XunitV3" Version="31.13.5" />
33+
<PackageVersion Include="xunit.v3" Version="3.2.2" />
34+
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
3535
</ItemGroup>
3636
</Project>

src/EntityFrameworkCore.Projectables.Generator/AnalyzerReleases.Shipped.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22

33
### New Rules
44

5-
Rule ID | Category | Severity | Notes
6-
--------|----------|----------|-------------------------------------------------------------------------
7-
EFP0003 | Design | Warning | Unsupported statement in block-bodied method
8-
EFP0004 | Design | Error | Statement with side effects in block-bodied method
9-
EFP0005 | Design | Warning | Potential side effect in block-bodied method
10-
EFP0006 | Design | Error | Method or property should expose a body definition (block or expression)
11-
EFP0007 | Design | Error | Unsupported pattern in projectable expression
12-
EFP0008 | Design | Error | Target class is missing a parameterless constructor
13-
EFP0009 | Design | Error | Delegated constructor cannot be analyzed for projection
14-
EFP0010 | Design | Error | UseMemberBody target member not found
15-
EFP0011 | Design | Error | UseMemberBody target member is incompatible
16-
EFP0012 | Design | Info | [Projectable] factory method can be converted to a constructor
5+
| Rule ID | Category | Severity | Notes |
6+
|---------|----------|----------|--------------------------------------------------------------------------|
7+
| EFP0003 | Design | Warning | Unsupported statement in block-bodied method |
8+
| EFP0004 | Design | Error | Statement with side effects in block-bodied method |
9+
| EFP0005 | Design | Warning | Potential side effect in block-bodied method |
10+
| EFP0006 | Design | Error | Method or property should expose a body definition (block or expression) |
11+
| EFP0007 | Design | Error | Unsupported pattern in projectable expression |
12+
| EFP0008 | Design | Error | Target class is missing a parameterless constructor |
13+
| EFP0009 | Design | Error | Delegated constructor cannot be analyzed for projection |
14+
| EFP0010 | Design | Error | UseMemberBody target member not found |
15+
| EFP0011 | Design | Error | UseMemberBody target member is incompatible |
16+
| EFP0012 | Design | Info | [Projectable] factory method can be converted to a constructor |
1717

1818
### Changed Rules
1919

20-
Rule ID | New Category | New Severity | Old Category | Old Severity | Notes
21-
--------|--------------|--------------|--------------|--------------|-----------------------------------------------------------------
22-
EFP0001 | Design | Warning | Design | Error | Changed to warning for experimental block-bodied members support
20+
| Rule ID | New Category | New Severity | Old Category | Old Severity | Notes |
21+
|---------|--------------|--------------|--------------|--------------|------------------------------------------------------------------|
22+
| EFP0001 | Design | Warning | Design | Error | Changed to warning for experimental block-bodied members support |
2323

2424
## Release 5.0
2525

2626
### New Rules
2727

28-
Rule ID | Category | Severity | Notes
29-
--------|----------|----------|------------------------------------------------------------------------------
30-
EFP0001 | Design | Error | Method or property should expose an expression body definition
31-
EFP0002 | Design | Error | Method or property is not configured to support null-conditional expressions
28+
| Rule ID | Category | Severity | Notes |
29+
|---------|----------|----------|------------------------------------------------------------------------------|
30+
| EFP0001 | Design | Error | Method or property should expose an expression body definition |
31+
| EFP0002 | Design | Error | Method or property is not configured to support null-conditional expressions |

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/BlockBodyExperimentalCodeFixProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace EntityFrameworkCore.Projectables.CodeFixes.Tests;
1010
/// Tests for <see cref="BlockBodyExperimentalCodeFixProvider"/> (EFP0001).
1111
/// The fix adds <c>AllowBlockBody = true</c> to the <c>[Projectable]</c> attribute.
1212
/// </summary>
13-
[UsesVerify]
1413
public class BlockBodyExperimentalCodeFixProviderTests : CodeFixTestBase
1514
{
1615
private readonly static BlockBodyExperimentalCodeFixProvider _provider = new();

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/EntityFrameworkCore.Projectables.CodeFixes.Tests.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
<PropertyGroup>
44
<IsPackable>false</IsPackable>
5+
<OutputType>exe</OutputType>
56
</PropertyGroup>
67

78
<ItemGroup>
@@ -16,8 +17,8 @@
1617
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
1718
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
1819
<PackageReference Include="Microsoft.NET.Test.Sdk" />
19-
<PackageReference Include="Verify.Xunit" />
20-
<PackageReference Include="xunit" />
20+
<PackageReference Include="Verify.XunitV3" />
21+
<PackageReference Include="xunit.v3" />
2122
<PackageReference Include="xunit.runner.visualstudio">
2223
<PrivateAssets>all</PrivateAssets>
2324
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/FactoryMethodToCtorCodeFixProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
/// Tests for <see cref="FactoryMethodToCtorCodeFixProvider"/> (EFP0012).
55
/// Verifies the code fix output via Verify.Xunit snapshots.
66
/// </summary>
7-
[UsesVerify]
87
public class FactoryMethodToCtorCodeFixProviderTests : CodeFixTestBase
98
{
109
private readonly static FactoryMethodToCtorCodeFixProvider _provider = new();

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/FactoryMethodToCtorCodeRefProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ namespace EntityFrameworkCore.Projectables.CodeFixes.Tests;
77
/// Tests for <see cref="FactoryMethodToConstructorCodeRefactoringProvider"/>.
88
/// Each test verifies via Verify.Xunit snapshots (.verified.txt files).
99
/// </summary>
10-
[UsesVerify]
1110
public class FactoryMethodToCtorCodeRefProviderTests : RefactoringTestBase
1211
{
1312
private readonly static FactoryMethodToConstructorCodeRefactoringProvider _provider = new();

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/MissingParamLessConstructorCodeFixProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ namespace EntityFrameworkCore.Projectables.CodeFixes.Tests;
1010
/// Tests for <see cref="MissingParameterlessConstructorCodeFixProvider"/> (EFP0008).
1111
/// The fix inserts a <c>public ClassName() { }</c> constructor at the top of the class body.
1212
/// </summary>
13-
[UsesVerify]
1413
public class MissingParamLessConstructorCodeFixProviderTests : CodeFixTestBase
1514
{
1615
private readonly static MissingParameterlessConstructorCodeFixProvider _provider = new();

tests/EntityFrameworkCore.Projectables.CodeFixes.Tests/NullConditionalRewriteUnsupportedCodeFixProviderTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace EntityFrameworkCore.Projectables.CodeFixes.Tests;
1111
/// The fix sets <c>NullConditionalRewriteSupport</c> on the <c>[Projectable]</c> attribute to
1212
/// either <c>Ignore</c> (action index 0) or <c>Rewrite</c> (action index 1).
1313
/// </summary>
14-
[UsesVerify]
1514
public class NullConditionalRewriteUnsupportedCodeFixProviderTests : CodeFixTestBase
1615
{
1716
private readonly static NullConditionalRewriteUnsupportedCodeFixProvider _provider = new();

tests/EntityFrameworkCore.Projectables.FunctionalTests/BlockBodiedMethods/BlockBodiedMethodTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
namespace EntityFrameworkCore.Projectables.FunctionalTests.BlockBodiedMethods
99
{
10-
[UsesVerify]
1110
public class BlockBodiedMethodTests
1211
{
1312
public record Entity

0 commit comments

Comments
 (0)