Skip to content

Bump C# TCGC to 0.72.0 and regenerate clients - #11928

Draft
Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 3 commits into
mainfrom
copilot/bump-tcgc-to-0720
Draft

Jorge Rangel (jorgerangel-msft) with Copilot wants to merge 3 commits into
mainfrom
copilot/bump-tcgc-to-0720

Conversation

Copilot AI commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Upgrade http-client-csharp to TCGC 0.72.0 and compatible dependencies, regenerate client baselines, and verify existing tests.

  • Dependencies: Update Azure Core to 0.72.0, TypeSpec to 1.16.0/0.86.0, and matching Spector/spec packages. Synchronize peer ranges and lockfile.
  • Regeneration: Include new body-or-no-content and SSE protocol scenarios. Add scenario-local client.tsp imports to rename the new SSE Info model to ProtocolInfo, avoiding generated file and factory collisions while preserving existing APIs.
  • Regression coverage: Assert that file uploads expose an optional string content type defaulting to application/octet-stream.
  • Validation: Generate.ps1 completed; 240 emitter tests, 4,176 generator/local tests, and 3 SSE integration tests passed. Existing skips unchanged.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
1 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI linked an issue Sep 10, 2026 that may be closed by this pull request
Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
@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 Sep 10, 2026
Copilot AI changed the title [WIP] Bump TCGC to version 0.72.0 and update dependencies Bump C# TCGC to 0.72.0 and regenerate clients Sep 10, 2026
"@typespec/streams": ">=0.85.0 <0.86.0 || ~0.86.0-0",
"@typespec/versioning": ">=0.85.0 <0.86.0 || ~0.86.0-0"
"@azure-tools/typespec-azure-core": "^0.72.0",
"@azure-tools/typespec-client-generator-core": "^0.72.0",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot we should not use ^ for dependencies that previously had a range. We should maintain the previous versioning range pattern for all dependencies that had it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the original >=current <next || ~next-0 pattern for all seven affected peer dependencies and synchronized the lockfile in feb67e8. Dependencies that already used ^ remain unchanged. No resolved versions changed; the build and all 56 focused tests passed.

)
$emitterDir = Resolve-Path (Join-Path $PSScriptRoot '..' '..')
$command = "npx tsp compile $specFile"
$customizationFile = Join-Path $generationDir "client.tsp"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot why are these changes needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pinned @typespec/http-specs@0.1.0-alpha.42 contains both Streaming.Sse.Unnamed.Info and Streaming.Sse.Protocol.Info. Regeneration overwrites Info.cs and produces duplicate model-factory signatures, breaking the build. This hook loads the scenario-local customization that renames only the new model to ProtocolInfo, preserving the existing API in both generation and Spector tests. Once we consume a published spec package containing #11920, this customization and hook can be removed.

strictEqual(bodyType.crossLanguageDefinitionId, "TypeSpec.Http.File");
strictEqual(bodyType.isFileType, true);

const contentTypeParam = method.operation.parameters.find((p) => p.name === "contentType");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot why are these changes needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These assertions cover the file-upload fix shipped in TCGC 0.72.0 (Azure/typespec-azure#5306): an unspecified content type becomes an optional string defaulting to application/octet-stream. They failed on 0.71.2 (constant instead of string) and pass on 0.72.0. They aren't required to perform the bump; they're focused regression coverage confirming that the C# emitter preserves the new behavior.

@pkg-pr-new

pkg-pr-new Bot commented Sep 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: feb67e8

Co-authored-by: jorgerangel-msft <102122018+jorgerangel-msft@users.noreply.github.com>
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.

Bump TCGC to 0.72.0

2 participants