Skip to content

fix(csharp): prevent plugin build output deadlock#11270

Merged
JoshLove-msft merged 1 commit into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/fix-plugin-build-stream-deadlock
Jul 16, 2026
Merged

fix(csharp): prevent plugin build output deadlock#11270
JoshLove-msft merged 1 commit into
microsoft:mainfrom
JoshLove-msft:joshlove-msft/fix-plugin-build-stream-deadlock

Conversation

@JoshLove-msft

Copy link
Copy Markdown
Contributor

Summary

  • drain plugin-build stdout and stderr concurrently to prevent redirected pipe deadlocks
  • add a deterministic regression that fills stderr before writing stdout

Validation

  • npm run build
  • npm run cop
  • dotnet test ./generator/Microsoft.TypeSpec.Generator/test/Microsoft.TypeSpec.Generator.Tests.csproj --filter FullyQualifiedName~GeneratorHandlerTests

No changelog entry is required for the C# emitter package.

Drain redirected stdout and stderr concurrently so plugin builds cannot block on a full process pipe. Add a regression that floods stderr before closing stdout.

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

Copilot-Session: 51c235b1-13fd-44d5-a869-f6dcb2add20c
@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@11270

commit: ba45a70

@github-actions

Copy link
Copy Markdown
Contributor

No changes needing a change description found.

@JoshLove-msft JoshLove-msft added this pull request to the merge queue Jul 16, 2026
Merged via the queue into microsoft:main with commit 740d167 Jul 16, 2026
29 checks passed
@JoshLove-msft JoshLove-msft deleted the joshlove-msft/fix-plugin-build-stream-deadlock branch July 16, 2026 17:41
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