Skip to content

refactor(ast_tools): remove COMMENTS variant modifier from raw transfer codegen#20361

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen
Mar 14, 2026
Merged

refactor(ast_tools): remove COMMENTS variant modifier from raw transfer codegen#20361
graphite-app[bot] merged 1 commit intomainfrom
om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 14, 2026

Refactor. The COMMENTS flag is redundant as the AST only has a comments property in Oxlint, and we already have a LINTER flag - use that instead.

Copy link
Member Author

overlookmotel commented Mar 14, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Refactors the raw-transfer deserializer codegen to remove the redundant COMMENTS variant flag and gate comment access via the existing LINTER flag, aligning with how Oxlint exposes Program.comments.

Changes:

  • Remove the COMMENTS flag from raw-transfer variant generation and reduce the flag set from 7 to 6.
  • Switch AST-id invalidation logic to key off LINTER instead of COMMENTS.
  • Update the Program raw deserializer template to conditionally include the comments getter under LINTER.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
tasks/ast_tools/src/generators/raw_transfer.rs Drops the COMMENTS flag from variant generation and adjusts related codegen paths/flags.
crates/oxc_ast/src/serialize/mod.rs Changes the raw-deserializer template so Program.comments is included only for the LINTER variant.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 14, 2026

Merging this PR will not alter performance

✅ 53 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen (f2c54e7) with main (6eb5b01)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (bf442f8) during the generation of this report, so 6eb5b01 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@overlookmotel overlookmotel self-assigned this Mar 14, 2026
@overlookmotel overlookmotel added A-parser Area - Parser A-linter-plugins Area - Linter JS plugins and removed A-parser Area - Parser labels Mar 14, 2026
@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Mar 14, 2026
@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 14, 2026

Merge activity

graphite-app bot pushed a commit that referenced this pull request Mar 14, 2026
…sfer codegen (#20361)

Refactor. The `COMMENTS` flag is redundant as the AST only has a `comments` property in Oxlint, and we already have a `LINTER` flag - use that instead.
@graphite-app graphite-app bot force-pushed the om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen branch from f2c54e7 to 4240164 Compare March 14, 2026 12:16
…sfer codegen (#20361)

Refactor. The `COMMENTS` flag is redundant as the AST only has a `comments` property in Oxlint, and we already have a `LINTER` flag - use that instead.
@graphite-app graphite-app bot force-pushed the om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen branch from 4240164 to b9f09fc Compare March 14, 2026 12:19
@graphite-app graphite-app bot merged commit b9f09fc into main Mar 14, 2026
21 checks passed
@graphite-app graphite-app bot deleted the om/03-13-refactor_ast_tools_remove_comments_variant_modifier_from_raw_transfer_codegen branch March 14, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0-merge Merge with Graphite Merge Queue A-ast Area - AST A-ast-tools Area - AST tools A-linter-plugins Area - Linter JS plugins C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants