Skip to content

Preserve synthesized node ranges across API serialization - #64903

Draft
Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-printer-source-comments
Draft

Ryan Cavanaugh (RyanCavanaugh) with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-printer-source-comments

Conversation

Copilot AI commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

The API encoder clamped synthesized ranges from -1 to 0, causing the printer to attach source comments to synthesized nodes.

  • Encoding: Preserve ranges for roots, children, and node lists.
  • Decoding: Read ranges as signed 32-bit values in Go and generated JavaScript node-list accessors.
  • Coverage: Add range round-trip and async/sync printer regressions verifying original comments remain intact without duplication.

@typescript-automation typescript-automation Bot added Author: Team For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 21, 2026
@typescript-automation typescript-automation Bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Milestone Bug PRs that fix a bug with a specific milestone labels Oct 21, 2026
Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix printer attaching source comments to synthesized nodes Preserve synthesized node ranges across API serialization Oct 21, 2026

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

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[API] Printer attaches source comments to synthesized nodes because the node encoder sends pos -1 as 0

2 participants