Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/instructions/cdac.instructions.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
applyTo: "src/native/managed/cdac/**"
applyTo: "src/native/managed/cdac/**,docs/design/datacontracts/**,src/coreclr/**/datadescriptor/**"
---

# cDAC — Folder-Specific Guidance
Expand Down Expand Up @@ -32,3 +32,16 @@ When porting `HRESULT`-returning APIs to throw exceptions, the following mapping
- `ArgumentException` → for `E_INVALIDARG`
- `NullReferenceException` → for `E_POINTER`
- `InvalidCastException` → for `E_NOINTERFACE`

## Documentation updates (ALL branches)

`docs/design/datacontracts/<Name>.md` is the authoritative spec of each contract (1:1 with `Abstractions/Contracts/I<Name>.cs`). If the PR changes any of the following without also updating the doc, **MUST** flag it as an error citing the exact doc file:

- **`Abstractions/Contracts/I<Name>.cs`** — added, removed, or renamed methods, or new exposed types/enums.
- **`Contracts/Contracts/<Name>_<N>.cs`** — a new version file (needs a new `## Version N` section), or a semantic change to an existing version's algorithm. Pure refactors don't need doc updates.
- **New contract** (new `I<Name>.cs` + `<Name>_1.cs`) — needs a new `docs/design/datacontracts/<Name>.md`.
- **`src/coreclr/**/datadescriptor/**`** — added, removed, or renamed types, fields, or globals may need a matching update in every consuming contract's doc; check whichever contracts' algorithms are affected.

Comment on lines +40 to +44
Do **NOT** require doc updates for pure refactors, test-only changes, bug fixes that restore documented behavior, `Legacy/**` (SOSDacImpl, DacDbi shim), or build/CI changes.