Skip to content

Support XML ApiCompat baselines in C# generator - #11395

Merged
JoshLove-msft merged 2 commits into
microsoft:mainfrom
JoshLove-msft:joshlove/apicompat-baseline-xml
Jul 27, 2026
Merged

Support XML ApiCompat baselines in C# generator#11395
JoshLove-msft merged 2 commits into
microsoft:mainfrom
JoshLove-msft:joshlove/apicompat-baseline-xml

Conversation

@JoshLove-msft

Copy link
Copy Markdown
Contributor

Summary

  • support modern XML ApiCompat suppression baselines while retaining legacy text baseline support
  • recognize CP0001 type and CP0002 member removals, including constructors, accessors, generic methods, and nested types
  • prefer XML when both baseline formats exist and ignore parameter-name suppressions that do not require API resurrection

This is required by Azure/azure-sdk-for-net#61353, which migrates the repository baselines to XML.

Validation

  • dotnet test ...Microsoft.TypeSpec.Generator.Tests.csproj --filter FullyQualifiedName~ApiCompatBaselineTests (28 passed)
  • stacked the change on the exact @typespec/http-client-csharp@1.0.0-alpha.20260722.4 generator embedded by Azure.ResourceManager.AppService in Replace legacy ApiCompat build integration Azure/azure-sdk-for-net#61353; regeneration produced no tracked SDK diffs

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 883420ab-f215-4afc-91a2-3433270335bb
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp label Jul 24, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@typespec/http-client-csharp@11395

commit: e6d961d

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 883420ab-f215-4afc-91a2-3433270335bb
@JoshLove-msft
JoshLove-msft enabled auto-merge July 27, 2026 16:11
@JoshLove-msft
JoshLove-msft added this pull request to the merge queue Jul 27, 2026
Merged via the queue into microsoft:main with commit 5e85c23 Jul 27, 2026
29 checks passed
@JoshLove-msft
JoshLove-msft deleted the joshlove/apicompat-baseline-xml branch July 27, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:csharp Issue for the C# client emitter: @typespec/http-client-csharp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants