Skip to content

Remove GetProjectReferenceFromSource from printer.EmitHost - #65522

Open
刘亦达 (zhengdaodeguL) wants to merge 1 commit into
microsoft:mainfrom
zhengdaodeguL:fix/printer-remove-windows-ipc-dep-65521
Open

刘亦达 (zhengdaodeguL) wants to merge 1 commit into
microsoft:mainfrom
zhengdaodeguL:fix/printer-remove-windows-ipc-dep-65521

Conversation

@zhengdaodeguL

Copy link
Copy Markdown

Fixes #65521

Importing tsc/internal/printer pulled in tsoptions, content-mapper support, and Windows IPC (github.com/Microsoft/go-winio) through GetProjectReferenceFromSource on printer.EmitHost. Go consumers that vendor the native printer on a case-insensitive filesystem could see go mod vendor collapse the Microsoft (go-winio) and microsoft (TypeScript) directories into one spelling, breaking a subsequent Linux checkout.

This PR removes the method from the narrower printer.EmitHost interface and drops the now-unused tsoptions import:

  • compiler.EmitHost still provides the method through DeclarationEmitHost, and the concrete emitHost implementation is untouched.
  • The only function taking the narrower printer.EmitHost (compiler.getScriptTransformers) does not call this method.

Verification:

  • GOOS=windows GOARCH=amd64 go -C tsc list -deps ./internal/printer no longer contains github.com/Microsoft/go-winio, tsc/internal/contentmapper, or tsc/internal/tsoptions (all present on base).
  • go -C tsc test ./internal/printer ./internal/compiler passes.
  • GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go -C tsc build ./cmd/tsc passes.

Credit to Arnav Dugar (@arnavdugar) for the diagnosis, the verification command, and the two-line patch in #65521, applied here as published.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 05:48
@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Nov 16, 2026
@typescript-automation typescript-automation Bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Nov 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Not started

Development

Successfully merging this pull request may close these issues.

Native printer pulls in Windows IPC when used on its own

2 participants