Skip to content

Commit b9abdf0

Browse files
author
fabien.menager
committed
Update copilot instructions
1 parent 80be0b8 commit b9abdf0

1 file changed

Lines changed: 59 additions & 15 deletions

File tree

.github/copilot-instructions.md

Lines changed: 59 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@
1010
src/
1111
EntityFrameworkCore.Projectables.Abstractions/ # [Projectable] attribute, enums
1212
EntityFrameworkCore.Projectables.Generator/ # Roslyn IIncrementalGenerator
13+
EntityFrameworkCore.Projectables.CodeFixes/ # Roslyn code fix providers (EFP0001/0002/0008/0012)
1314
EntityFrameworkCore.Projectables/ # Runtime library (EF Core integration)
1415
tests/
15-
EntityFrameworkCore.Projectables.Generator.Tests/ # Roslyn generator unit tests (Verify snapshots)
16-
EntityFrameworkCore.Projectables.FunctionalTests/ # End-to-end EF Core tests (Verify snapshots)
17-
EntityFrameworkCore.Projectables.Tests/ # Misc unit tests
18-
benchmarks/ # BenchmarkDotNet benchmarks
19-
samples/ # Readme sample project
16+
EntityFrameworkCore.Projectables.Generator.Tests/ # Roslyn generator unit tests (Verify snapshots)
17+
EntityFrameworkCore.Projectables.CodeFixes.Tests/ # Code fix unit tests (Verify snapshots)
18+
EntityFrameworkCore.Projectables.FunctionalTests/ # End-to-end EF Core tests (Verify snapshots)
19+
EntityFrameworkCore.Projectables.Tests/ # Misc unit tests
20+
benchmarks/ # BenchmarkDotNet benchmarks
21+
samples/ # Readme sample project
2022
```
2123

2224
---
@@ -233,7 +235,7 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
233235
| `ProjectableDescriptor.cs` | Pure data record describing a projectable member |
234236
| `ProjectableAttributeData.cs` | Serializable snapshot of `[Projectable]` attribute values (no live Roslyn objects) |
235237
| `ProjectionRegistryEmitter.cs` | Emits `ProjectionRegistry.g.cs` |
236-
| `Diagnostics.cs` | All `DiagnosticDescriptor` constants (EFP0001–EFP0009) |
238+
| `Diagnostics.cs` | All `DiagnosticDescriptor` constants (EFP0001–EFP0012) |
237239

238240
### Incremental generator rules
239241
- **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 +245,20 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
243245

244246
## Diagnostics Reference
245247

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 |
248+
| ID | Severity | Title | Code Fix |
249+
|---------|----------|----------------------------------------------------------------|-----------------------------------------------------------|
250+
| EFP0001 | Warning | Block-bodied member support is experimental | Add `AllowBlockBody = true` to `[Projectable]` |
251+
| EFP0002 | Error | Null-conditional expression not configured | Configure `NullConditionalRewriteSupport` |
252+
| EFP0003 | Warning | Unsupported statement in block-bodied method ||
253+
| EFP0004 | Error | Statement with side effects in block-bodied method ||
254+
| EFP0005 | Warning | Potential side effect in block-bodied method ||
255+
| EFP0006 | Error | Method or property should expose a body definition ||
256+
| EFP0007 | Error | Unsupported pattern in projectable expression ||
257+
| EFP0008 | Error | Target class is missing a parameterless constructor | Add parameterless constructor to the class |
258+
| EFP0009 | Error | Delegated constructor cannot be analyzed for projection ||
259+
| EFP0010 | Error | UseMemberBody target member not found ||
260+
| EFP0011 | Error | UseMemberBody target member is incompatible ||
261+
| EFP0012 | Info | [Projectable] factory method can be converted to a constructor | Convert to `[Projectable]` constructor (+ update callers) |
255262

256263
---
257264

@@ -280,6 +287,43 @@ $env:VERIFY_AUTO_APPROVE = "true"; dotnet test
280287

281288
---
282289

290+
## Documentation & README
291+
292+
### When to update `README.md`
293+
294+
- A user-facing feature is added, changed, or removed — keep the **feature table** current
295+
- Supported EF Core / .NET versions change
296+
- NuGet package names or the "Getting started" steps change
297+
298+
### When to update `docs/`
299+
300+
The docs site is a **VitePress** project (`docs/`). Run it locally with:
301+
302+
```bash
303+
cd docs
304+
npm install # first time only
305+
npm run dev
306+
```
307+
308+
Update the relevant page(s) in `docs/` whenever:
309+
310+
- A feature's behavior changes — edit the corresponding guide or reference page
311+
- A new doc page is added or an existing one is removed — **also update the sidebar** in `docs/.vitepress/config.mts`
312+
- Package installation or `UseProjectables()` API changes — update `docs/guide/quickstart.md`
313+
314+
### Doc structure
315+
316+
| Folder | Content |
317+
|-------------------|------------------------------------------------------|
318+
| `docs/guide/` | Getting-started guides (quickstart, core concepts) |
319+
| `docs/reference/` | Attribute reference, diagnostics, compatibility mode |
320+
| `docs/advanced/` | Internals, block-bodied members, limitations |
321+
| `docs/recipes/` | End-to-end usage examples |
322+
323+
The VitePress sidebar is declared in `docs/.vitepress/config.mts` — keep it in sync with actual files.
324+
325+
---
326+
283327
## Package Management
284328

285329
Central package version management is enabled (`ManagePackageVersionsCentrally = true`).

0 commit comments

Comments
 (0)