Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions docs/site/src/content/docs/diagnostics/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,7 @@ Analyzer help links use `https://aka.ms/orleans/diagnostics` with the diagnostic
## ORLEANS0026

[Invalid invokable base type mapping](orleans0026.md) — Error. A custom grain-call return type mapping cannot generate a valid invokable request.

## ORLEANS0027

[Grain interface member removed from source](orleans0027.md) — Warning. The manifest retains an RPC signature which is absent from source.
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0016.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0016: Grain interface is not active in OrleansContracts.txt"
description: Understand and resolve ORLEANS0016 when a grain interface is missing or retired in the contract manifest.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -27,6 +27,8 @@ Verify the interface identity and version, then apply **Add to OrleansContracts.

If the interface was restored accidentally, remove it from source or introduce a separately named replacement instead of reusing a retired identity.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Deployable RPC contracts should remain in the manifest. If the project intentionally does not maintain a contract manifest, disable the contract analyzer for the project instead of suppressing individual interfaces.
Expand Down
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0017.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0017: Grain interface version mismatch"
description: Understand and resolve ORLEANS0017 when a grain interface version differs from OrleansContracts.txt.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -25,6 +25,8 @@ The manifest no longer describes the numeric version used by runtime compatibili

Determine whether the source or manifest changed unintentionally. Restore the previous source version, or review the rolling-upgrade implications and apply **Update version in OrleansContracts.txt** when the new version is intentional.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Use suppression only during a short-lived staged edit. Do not release with a source and manifest version mismatch.
Expand Down
8 changes: 6 additions & 2 deletions docs/site/src/content/docs/diagnostics/orleans0018.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0018: Grain interface member not declared"
description: Understand and resolve ORLEANS0018 when an RPC method signature is missing from OrleansContracts.txt.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -17,13 +17,17 @@ ms.topic: reference

An ordinary grain-interface method has no matching contract signature in `OrleansContracts.txt`. Method identity, generic arity, parameter types and order, and return type are part of the signature. Parameter names are not.

The method identity is the source `[Id]` value, the source `[Alias]` value, or the generated xxHash32 ID used by the Orleans code generator. Recording a generated ID in the manifest does not add an attribute or change the runtime identity.

## Impact

Older activations can receive an unknown RPC, and changed identities or payload types can cause dispatch or serialization failures during a rolling upgrade.

## How to fix

Prefer preserving the existing method and adding a new method for changed behavior. Review payload compatibility, increment the interface version when appropriate, and apply **Add to OrleansContracts.txt**. The code fix records the new signature but does not increment `[Version]`.
Prefer preserving the existing method and adding a new method for changed behavior. Review payload compatibility, increment the interface version when appropriate, and apply **Add to OrleansContracts.txt**. The code fix records the existing effective wire identity and does not increment `[Version]` or modify source attributes.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Expand Down
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0019.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0019: Removed grain interface is not retired"
description: Understand and resolve ORLEANS0019 when OrleansContracts.txt contains an active interface that source no longer defines.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -25,6 +25,8 @@ The deletion or identity-changing rename is not recorded as intentional, and the

Restore the interface if its removal was accidental. Otherwise apply **Mark as *RETIRED* in OrleansContracts.txt**. Preserve retired declarations as contract history.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest and retire every declaration absent from source, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Suppression is appropriate only when the manifest intentionally contains contracts owned by another compilation. Prefer one manifest per project so ownership remains explicit.
Expand Down
6 changes: 3 additions & 3 deletions docs/site/src/content/docs/diagnostics/orleans0020.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0020: OrleansContracts.txt is missing"
description: Understand and resolve ORLEANS0020 when contract compatibility analysis is enabled without a manifest.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -11,7 +11,7 @@ ms.topic: reference
| --- | --- |
| Category | Orleans.Versioning |
| Severity | Info |
| Code fix | Not available |
| Code fix | Available |

## Cause

Expand All @@ -23,7 +23,7 @@ The analyzer has no baseline, so it cannot detect RPC identity, signature, versi

## How to fix

Create `OrleansContracts.txt` at `OrleansContractsPath`, add it to source control, and rebuild. Apply the resulting diagnostics' code fixes to populate interface, method, and class declarations.
Apply **Regenerate OrleansContracts.txt** to create and populate the complete project manifest. Use **Fix all in solution** to create manifests for every affected project, then add the generated files to source control and review the baseline using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Expand Down
6 changes: 3 additions & 3 deletions docs/site/src/content/docs/diagnostics/orleans0021.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0021: Duplicate grain interface declaration"
description: Understand and resolve ORLEANS0021 when OrleansContracts.txt declares an interface identity more than once.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -15,15 +15,15 @@ ms.topic: reference

## Cause

`OrleansContracts.txt` repeats an interface CLR name or a non-empty `GrainInterfaceType`, including active and retired declarations with the same identity.
`OrleansContracts.txt` repeats an effective interface identity. The effective identity is `GrainInterfaceType` when present and the identity derived from the recorded CLR name using Orleans conventions for a legacy declaration.

## Impact

The manifest is ambiguous. The parser retains the first declaration, so compatibility review can use the wrong version or method set.

## How to fix

Merge the declarations into one canonical entry. Keep one active declaration when the interface exists, or one retired declaration when it has been removed.
Merge declarations which have the same effective identity into one canonical entry. Active and retired declarations can share a CLR name when they record different explicit `GrainInterfaceType` values across an identity migration.

## Suppress the diagnostic

Expand Down
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0022.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0022: Grain class is not active in OrleansContracts.txt"
description: Understand and resolve ORLEANS0022 when a concrete grain class is missing or retired in the contract manifest.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -25,6 +25,8 @@ The implementation identity is not protected by contract review. A CLR rename wi

Verify the class's durable grain type, add `[GrainType]` when it must remain independent of the CLR name, and apply **Add to OrleansContracts.txt**. The code fix adds or reactivates the class declaration.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Suppress only for a grain class intentionally excluded from deployment-contract tracking.
Expand Down
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0023.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0023: Grain class identity mismatch"
description: Understand and resolve ORLEANS0023 when a grain class GrainType differs from OrleansContracts.txt.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -27,6 +27,8 @@ Restore the previous `[GrainType]` when the change was accidental. Update the ma

The **Update grain class alias in OrleansContracts.txt** code fix accepts the source identity as the new baseline. Review the identity change before applying it.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Suppress only for a deliberate, documented identity migration. Updating the reviewed baseline is preferable to retaining a suppression.
Expand Down
4 changes: 3 additions & 1 deletion docs/site/src/content/docs/diagnostics/orleans0024.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0024: Removed grain class is not retired"
description: Understand and resolve ORLEANS0024 when OrleansContracts.txt contains an active grain class that source no longer defines.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -25,6 +25,8 @@ The removal or identity-changing rename is not recorded, and the old grain ident

Restore the class if its removal was accidental. Otherwise apply **Mark grain class as *RETIRED* in OrleansContracts.txt** and preserve the declaration.

Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest and retire every declaration absent from source, or use **Fix all in solution** to update every affected project. Review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Suppress only when the manifest intentionally includes classes owned by another compilation. Prefer separate project manifests.
Expand Down
6 changes: 3 additions & 3 deletions docs/site/src/content/docs/diagnostics/orleans0025.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: "ORLEANS0025: Duplicate grain class declaration"
description: Understand and resolve ORLEANS0025 when OrleansContracts.txt declares a grain identity more than once.
ms.date: 08/25/2026
ms.date: 08/27/2026
ms.topic: reference
---

Expand All @@ -15,15 +15,15 @@ ms.topic: reference

## Cause

`OrleansContracts.txt` repeats a grain class CLR name or a non-empty `GrainType`, including active and retired declarations with the same identity.
`OrleansContracts.txt` repeats an effective grain class identity. The effective identity is `GrainType` when present and the identity derived from the recorded CLR name using Orleans conventions for a legacy declaration.

## Impact

The grain identity history becomes ambiguous, and the parser accepts only the first declaration.

## How to fix

Merge or remove duplicates, retaining one canonical active or retired declaration.
Merge declarations which have the same effective identity into one canonical entry. Active and retired declarations can share a CLR name when they record different explicit `GrainType` values across an identity migration.

## Suppress the diagnostic

Expand Down
37 changes: 37 additions & 0 deletions docs/site/src/content/docs/diagnostics/orleans0027.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: "ORLEANS0027: Grain interface member removed from source"
description: Understand and resolve ORLEANS0027 when OrleansContracts.txt retains an RPC method which is absent from source.
ms.date: 08/27/2026
ms.topic: reference
---

# ORLEANS0027: Grain interface member removed from source

| Property | Value |
| --- | --- |
| Category | Orleans.Versioning |
| Severity | Warning |
| Code fix | Not available |

## Cause

`OrleansContracts.txt` declares an RPC method signature which is absent from the matching source grain interface. The manifest identity is an explicit `[Id]` or `[Alias]` value when present in source; otherwise, it is the generated method ID already used by Orleans on the wire.

## Impact

Removing an RPC method can break calls from older clients or activations during a rolling upgrade. Regeneration retains the historical signature so the wire-contract removal remains visible and requires an explicit decision.

## How to fix

Restore the source method when the removal was accidental. When the removal is intentional, review the mixed-version deployment impact, increment the interface version when appropriate, and explicitly remove the retained signature from `OrleansContracts.txt`.

See [Orleans contract compatibility analyzer](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).

## Suppress the diagnostic

Prefer updating the reviewed manifest after accepting the contract removal. Suppress only for a manifest intentionally shared with another compilation.

```ini
[*]
dotnet_diagnostic.ORLEANS0027.severity = none
```
Loading