Skip to content

[http-client-csharp] Skip backcompat factories with unavailable types - #11473

Open
JoshLove-msft wants to merge 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/backcompat-unavailable-factory-types
Open

[http-client-csharp] Skip backcompat factories with unavailable types#11473
JoshLove-msft wants to merge 3 commits into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/backcompat-unavailable-factory-types

Conversation

@JoshLove-msft

@JoshLove-msft JoshLove-msft commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • skip backward-compatible model factory methods when their previous signature references a type that is no longer generated or available from referenced assemblies
  • recursively validate generic type arguments and report an unavailable-backcompat-type diagnostic when a method is skipped
  • cover unavailable direct and generic parameter types and unavailable model return types

This prevents the stale model-factory overload exposed by the external type resolution scenario in #11465.

Testing

Fixes #11471

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

Copilot-Session: c4da49e5-30c3-4be2-8083-fc61b690f9fa
@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 30, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 30, 2026

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 54c6512

@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: c4da49e5-30c3-4be2-8083-fc61b690f9fa
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: c4da49e5-30c3-4be2-8083-fc61b690f9fa
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.

C# backcompat generation emits methods referencing removed local types

1 participant