Skip to content

Revert "Use provider C# reference map with pre-write internalization" - #11282

Merged
live1206 merged 1 commit into
mainfrom
revert-10976-mtg-hybrid-reference-map
Jul 17, 2026
Merged

Revert "Use provider C# reference map with pre-write internalization"#11282
live1206 merged 1 commit into
mainfrom
revert-10976-mtg-hybrid-reference-map

Conversation

@jorgerangel-msft

Copy link
Copy Markdown
Contributor

Reverts #10976

@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 16, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 16, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: d667fe9

@jorgerangel-msft
jorgerangel-msft marked this pull request as ready for review July 16, 2026 22:22
@jorgerangel-msft

Copy link
Copy Markdown
Contributor Author

@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.

@live1206
live1206 added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 0540648 Jul 17, 2026
29 checks passed
@live1206
live1206 deleted the revert-10976-mtg-hybrid-reference-map branch July 17, 2026 16:11
live1206 added a commit to live1206/typespec that referenced this pull request Jul 20, 2026
Revert the main-branch rollback from microsoft#11282 while preserving the accessibility and SDK-compatibility fixes already on microsoft#11288. Keep the shared internal helper provider from microsoft#11285, but let provider-graph reachability determine whether helpers are emitted.

This reverts commit 0540648.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4b68173-2f2b-467d-9a94-9be9d14b5e17
iscai-msft pushed a commit to iscai-msft/typespec that referenced this pull request Jul 23, 2026
…11288)

## Summary

- restore the provider-graph reference map after its main-branch
rollback in microsoft#11282, preserving the performance improvement over
Roslyn-based generated-source analysis
- keep all follow-up compatibility fixes already developed in this PR:
  - preserve concrete and nested discriminator variants
- distinguish metadata-only union items erased to `BinaryData` from
semantic public and implementation dependencies
- retain generated types that were public in the configured last GA
contract, including effectively public nested types
- preserve the owning model's accessibility when serialization partial
providers have different default modifiers
- derive collection-header helper dependencies from the selected
`HttpRequestApi`, avoiding unused `PipelineRequestHeadersExtensions`
output
- reconcile microsoft#11285 with the restored provider graph:
- retain its shared `InternalHelperProvider` modifiers and lazy helper
construction
- preserve its intentional non-root registration so generator-owned
internal helpers remain emitted without becoming accessibility roots
- add positive and negative coverage for accessibility, retention, GA
contracts, nested effective accessibility, serialization ownership,
metadata-only references, and request-helper dependencies

Fixes microsoft#11291.

## Main-branch reconciliation

This branch merges current `main` and explicitly reverts squash commit
`05406488b` from microsoft#11282. The existing microsoft#11288 commits remain intact as
follow-up commits rather than being rebased or squashed away.

## Validation

- passed 1,712 core generator tests and 1,504 ClientModel tests
- passed package build, full C# test-library regeneration, formatting,
Cop, and type-aware oxlint
- regenerated all 46 Azure and unbranded data-plane libraries with
`RegenPreview.ps1`: 46 passed, 0 failed, with no untracked files or
unexpected request helpers
- repeated the full SDK regeneration from latest Azure SDK `main`; the
resulting 72-file expected patch was byte-for-byte identical
- reproduced the service-wide Purview generation command with the local
generator; it completed successfully and produced only the expected
DataMap helper removal
- regenerated App Configuration and Projects.Agents after restoring
microsoft#11285 helper retention; representative internal helper files remain
byte-for-byte unchanged while the valid reference-map cleanup remains

---------

Co-authored-by: Copilot <223556219+Copilot@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.

3 participants