Skip to content

Remove the compiler options dependency from the printer - #65523

Merged
Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
arnavdugar:codex/printer-host-deps
Nov 16, 2026
Merged

Jake Bailey (jakebailey) merged 1 commit into
microsoft:mainfrom
arnavdugar:codex/printer-host-deps

Conversation

@arnavdugar

Copy link
Copy Markdown
Contributor

Importing the native printer pulls in compiler project options and Windows IPC through GetProjectReferenceFromSource on printer.EmitHost. On case-insensitive filesystems, Go vendoring can fold the microsoft and Microsoft directories into one, causing a later Linux build to miss the TypeScript imports.

Remove the redundant method and its import from the printer. The full compiler still inherits the method through DeclarationEmitHost, and the printer can be imported without pulling in Windows IPC.

Fixes #65521. The issue is awaiting Backlog triage.

Validation

  • The Windows dependency list for ./internal/printer no longer includes go-winio.
  • hereby test:tsc, hereby test:api, hereby lint, and hereby tidy passed. The changed file passed formatting checks.
  • The full compiler cross-built for Windows x64 with go-winio still included.

AI disclosure: Codex authored the patch and ran the validation.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 05:53
@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.

🟢 Approval recommended

No active review issues are reported for the change removing the printer’s indirect compiler-options dependency.

No open issues 🎉

What changed in this PR

Decouples the native printer from compiler options, addressing #65521 by removing an indirect Windows IPC dependency that can cause vendoring failures on case-insensitive filesystems.

Changes:

  • Removes the redundant GetProjectReferenceFromSource method from printer.EmitHost and its tsoptions import.
  • Preserves the full compiler’s access to the method through DeclarationEmitHost.
File Description
tsc/​internal/​printer/​emithost.go Narrows the printer host interface and removes the compiler-options dependency.

Review effort: Balanced

@jakebailey Jake Bailey (jakebailey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's really dumb that vendoring doesn't use the same escaping scheme as the module cache, and it's also dumb that this is the fix, extremely brittle, but it is a cleanup

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Nov 16, 2026
@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 16, 2026
Merged via the queue into microsoft:main with commit 5e32f32 Nov 16, 2026
34 checks passed
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Nov 16, 2026
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: Done

Development

Successfully merging this pull request may close these issues.

Native printer pulls in Windows IPC when used on its own

3 participants