Fix C# generator base model recursion#11008
Conversation
Make base model provider traversal cycle-safe across model construction, MRW serialization, and ModelReaderWriter context collection. Also emit explicit response conversion hiding at the ClientModel layer when a base model already exposes the same conversion. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
commit: |
|
No changes needing a change description found. |
|
No regen diff in Azure/azure-sdk-for-net#59998 |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Review notes (non-blocking)LGTM overall — correct, well-scoped cycle-safety fix. CI is green and the change is approved. A few minor observations:
--generated by Copilot |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Added a regression test ( It wires two --generated by Copilot |
Fixes C# generator recursion when a customized/base model provider chain cycles through an inheritable system model.
Changes:
newon explicit response conversion operators from ClientModel when a base model already exposes the same conversion.Validation:
dotnet build packages/http-client-csharp/generator/Microsoft.TypeSpec.Generator.ClientModel/src/Microsoft.TypeSpec.Generator.ClientModel.csproj -v:minimal