Skip to content

Fix C# provider-based public reference map#11091

Draft
ArcturusZhang wants to merge 4 commits into
microsoft:mainfrom
ArcturusZhang:arcturus/fix-csharp-provider-reference-map
Draft

Fix C# provider-based public reference map#11091
ArcturusZhang wants to merge 4 commits into
microsoft:mainfrom
ArcturusZhang:arcturus/fix-csharp-provider-reference-map

Conversation

@ArcturusZhang

@ArcturusZhang ArcturusZhang commented Jun 25, 2026

Copy link
Copy Markdown
Member

Fixes the C# generator post-processing path to internalize generated TypeProviders before writing files. The new provider-level reference map starts from root TypeProviders, walks each canonical view's public API surface, and updates unreached public providers to internal via TypeProvider.Update instead of relying on Roslyn syntax edits.

Also removes the obsolete removeOrInternalize option; the default behavior is now internalize.

Validation:

  • dotnet test generator/Microsoft.TypeSpec.Generator/test/Microsoft.TypeSpec.Generator.Tests.csproj --filter InternalizeUsesProviderPublicApiReferences --no-restore --nologo
  • dotnet test generator/Microsoft.TypeSpec.Generator/test/Microsoft.TypeSpec.Generator.Tests.csproj --filter "FullyQualifiedNamePostProcessorTests|FullyQualifiedNameConfigurationTests" --no-restore --nologo
  • npx vitest run -c ./emitter/vitest.config.ts emitter/test/Unit/options.test.ts
  • npm run build
  • npm run format -- --check
  • npm run cop

Co-authored-by: Copilot <223556219+Copilot@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 Jun 25, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jun 25, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 763515c

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

ArcturusZhang and others added 3 commits June 25, 2026 18:47
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

1 participant