Repository navigation
[api] Fix named pipe / UDS creation - #64818
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Repeated transport closure can delete a replacement Unix socket and prevent new connections.
1 open finding
What changed in this PR
Improves API transport creation for the native TypeScript compiler and language server.
Changes:
- Creates private Unix socket directories with explicit permissions and cleanup.
- Updates explicit Unix path semantics and documentation.
- Randomizes Windows sync API pipe names.
| File | Description |
|---|---|
| tsc/internal/lsp/server.go | Creates private transports and returns their actual paths. |
| tsc/internal/lsp/lsproto/lsp_generated.go | Documents Unix directory semantics. |
| tsc/internal/ipc/transport.go | Adds private transport creation and cleanup. |
| tsc/internal/ipc/transport_windows.go | Adapts Windows listener creation. |
| tsc/internal/ipc/transport_unix.go | Creates permission-restricted sockets and directories. |
| tsc/internal/ipc/transport_unix_test.go | Tests permissions, directory reuse rejection, and cleanup. |
| tsc/internal/api/server.go | Updates pipe option documentation. |
| tsc/cmd/tsc/api.go | Updates command-line pipe help. |
| tools/scripts/lsp/generate.mts | Updates protocol documentation generation. |
| packages/typescript/src/api/syncChannel.ts | Uses randomized Windows pipe names. |
Files not reviewed (1)
- tsc/internal/lsp/lsproto/lsp_generated.go: Generated file
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
🟡 Changes recommended
The Windows connectivity test lacks an Accept call, causing dialing to time out despite correct permissions.
1 open finding
1 resolved since last review
Files not reviewed (1)
- tsc/internal/lsp/lsproto/lsp_generated.go: Generated file
🧠 Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-platform access controls and cleanup behavior need Unix and Windows validation that was not performed during this review.
0 open findings
1 resolved since last review
Files not reviewed (1)
- tsc/internal/lsp/lsproto/lsp_generated.go: Generated file
🧠 Review effort: Balanced
Jake Bailey (jakebailey)
left a comment
There was a problem hiding this comment.
After this is merged, see if we can do a cherry pick of this to release-7.0 (the bot won't let you do it until this is merged, but I bet it conflicts anyway)
|
TypeScript Bot (@typescript-bot) cherry-pick this to release-7.0 |
|
Hey, Andrew Branch (@andrewbranch)! I was unable to cherry-pick this PR. Check the logs at: https://github.com/microsoft/TypeScript/actions/runs/38650096582 |

One semi-related fix per commit.
${tmpdir}/socket, so the same strategy as above can be used