Skip to content

Commit 2b8a30e

Browse files
committed
docs(analyzers): require project-level regeneration
1 parent 26a60a6 commit 2b8a30e

17 files changed

Lines changed: 23 additions & 308 deletions

File tree

Orleans.slnx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
<Project Path="src/Orleans.BroadcastChannel/Orleans.BroadcastChannel.csproj" />
4040
<Project Path="src/Orleans.Client/Orleans.Client.csproj" />
4141
<Project Path="src/Orleans.CodeGenerator/Orleans.CodeGenerator.csproj" />
42-
<Project Path="src/Orleans.ContractTool/Orleans.ContractTool.csproj" />
4342
<Project Path="src/Orleans.Core.Abstractions/Orleans.Core.Abstractions.csproj" />
4443
<Project Path="src/Orleans.Core/Orleans.Core.csproj" />
4544
<Project Path="src/Orleans.EventSourcing/Orleans.EventSourcing.csproj" />

docs/site/src/content/docs/diagnostics/orleans0016.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Verify the interface identity and version, then apply **Add to OrleansContracts.
2727

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

30-
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).
30+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
3131

3232
## Suppress the diagnostic
3333

docs/site/src/content/docs/diagnostics/orleans0017.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The manifest no longer describes the numeric version used by runtime compatibili
2525

2626
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.
2727

28-
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).
28+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
2929

3030
## Suppress the diagnostic
3131

docs/site/src/content/docs/diagnostics/orleans0018.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Older activations can receive an unknown RPC, and changed identities or payload
2727

2828
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 CLR signature and effective wire identity in the manifest. Source attributes remain unchanged.
2929

30-
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).
30+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
3131

3232
## Suppress the diagnostic
3333

docs/site/src/content/docs/diagnostics/orleans0019.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The deletion or identity-changing rename is not recorded as intentional, and the
2525

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

28-
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).
28+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest and retire every declaration absent from source. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
2929

3030
## Suppress the diagnostic
3131

docs/site/src/content/docs/diagnostics/orleans0020.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The analyzer has no baseline, so it cannot detect RPC identity, signature, versi
2323

2424
## How to fix
2525

26-
Apply **Regenerate OrleansContracts.txt** to create and populate the complete project manifest. The configured path can be absent; the code fix creates the file and its parent directory. For a large solution, use the `Microsoft.Orleans.ContractTool` tool to regenerate every enabled project through a filtered workspace. 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).
26+
Apply **Regenerate OrleansContracts.txt** to create and populate the complete project manifest. The configured path can be absent; the code fix creates the file and its parent directory. Run regeneration separately for each contract project instead of passing a solution path. 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).
2727

2828
## Suppress the diagnostic
2929

docs/site/src/content/docs/diagnostics/orleans0022.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The implementation identity is not protected by contract review. A CLR rename wi
2525

2626
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.
2727

28-
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).
28+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
2929

3030
## Suppress the diagnostic
3131

docs/site/src/content/docs/diagnostics/orleans0023.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Restore the previous `[GrainType]` when the change was accidental. Update the ma
2727

2828
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.
2929

30-
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).
30+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
3131

3232
## Suppress the diagnostic
3333

docs/site/src/content/docs/diagnostics/orleans0024.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The removal or identity-changing rename is not recorded, and the old grain ident
2525

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

28-
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).
28+
Apply **Regenerate OrleansContracts.txt** to rebuild the complete project manifest and retire every declaration absent from source. Run regeneration separately for each contract project and review the generated diff using the [contract compatibility guidance](../grains/grain-versioning/contract-compatibility-analyzer.md#regenerate-the-manifest).
2929

3030
## Suppress the diagnostic
3131

docs/site/src/content/docs/grains/grain-versioning/contract-compatibility-analyzer.md

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The regeneration code fix rebuilds every active interface, method, and grain-cla
5151

5252
### Regenerate the manifest
5353

54-
Apply **Regenerate OrleansContracts.txt** from `ORLEANS0016`, `ORLEANS0017`, `ORLEANS0018`, `ORLEANS0019`, `ORLEANS0020`, `ORLEANS0022`, `ORLEANS0023`, or `ORLEANS0024`. One application regenerates the entire project manifest. In an IDE, use **Fix all in project** or **Fix all in solution** to regenerate every affected project.
54+
Apply **Regenerate OrleansContracts.txt** from `ORLEANS0016`, `ORLEANS0017`, `ORLEANS0018`, `ORLEANS0019`, `ORLEANS0020`, `ORLEANS0022`, `ORLEANS0023`, or `ORLEANS0024`. One application regenerates the entire project manifest. In an IDE, use **Fix all in project**.
5555

5656
`ORLEANS0027` intentionally retains a removed method signature, so regeneration isn't offered for that diagnostic. If it is the only remaining diagnostic, restore the source method or explicitly delete the retained signature after reviewing and accepting the wire-compatibility break.
5757

@@ -63,15 +63,7 @@ dotnet format PATH_TO_PROJECT.csproj analyzers --severity info --diagnostics ORL
6363

6464
Run the command from the repository root. Replace `PATH_TO_PROJECT.csproj` with the owning project path to regenerate one manifest. The `--severity info` option includes `ORLEANS0020`, allowing the command to create the default manifest or a configured `OrleansContractsPath`, including its parent directory.
6565

66-
For a large solution, install the contract tool in the repository and use it to regenerate only analyzer-enabled projects. If the repository does not have a tool manifest, create one first:
67-
68-
```dotnetcli
69-
dotnet new tool-manifest
70-
dotnet tool install Microsoft.Orleans.ContractTool
71-
dotnet tool run orleans-contracts PATH_TO_SOLUTION.slnx
72-
```
73-
74-
The tool evaluates the solution to identify enabled C# projects which contain a manifest or Orleans contract declarations, creates a temporary filtered solution, and runs regeneration against that smaller workspace. Commit the tool manifest so every developer and build agent uses the same tool version.
66+
Run the command once for each project which owns an Orleans contract manifest. Do not pass a `.sln` or `.slnx` path: `dotnet format` analyzes the complete solution before applying Fix All, which can consume substantial time and memory in large repositories. Automation can invoke the project command for each contract project with bounded parallelism.
7567

7668
Regeneration edits `OrleansContracts.txt` files only. Source `[Alias]`, `[Id]`, `[GrainType]`, and `[GrainInterfaceType]` attributes remain unchanged.
7769

@@ -101,7 +93,7 @@ Interface methods are indented beneath their interface:
10193
# This file is generated by the Orleans contract analyzer.
10294
# To regenerate this project from the repository root:
10395
# dotnet format PATH_TO_PROJECT.csproj analyzers --severity info --diagnostics ORLEANS0016 ORLEANS0017 ORLEANS0018 ORLEANS0019 ORLEANS0020 ORLEANS0022 ORLEANS0023 ORLEANS0024
104-
# To regenerate an enabled solution: dotnet tool run orleans-contracts PATH_TO_SOLUTION
96+
# Run the command once per contract project; do not pass a .sln or .slnx path.
10597
# Verify with: dotnet build PATH_TO_PROJECT.csproj
10698
# The regeneration command edits this manifest only; it does not change source attributes.
10799
# OrleansContracts format: 2

0 commit comments

Comments
 (0)