Skip to content

Conversation

@Boshen
Copy link
Member

@Boshen Boshen commented Aug 13, 2025

closes #12982

Copilot AI review requested due to automatic review settings August 13, 2025 04:11
@github-actions github-actions bot added A-codegen Area - Code Generation C-enhancement Category - New feature or request labels Aug 13, 2025
Copy link
Member Author

Boshen commented Aug 13, 2025


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 hot fixes, skip the queue and merge this PR next

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

This PR adds functionality to allow attaching comments to the top of a file in the code generator. The changes enable comments to be positioned at the beginning of generated files rather than only inline with code elements.

Key changes:

  • Added comment printing capability at the file start (position 0)
  • Created test coverage for the new top-of-file comment functionality

Reviewed Changes

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

File Description
crates/oxc_codegen/src/gen.rs Added call to print comments at position 0 before other content
crates/oxc_codegen/tests/integration/comments.rs Added test case to verify comments can be attached to file top

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Aug 13, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented Aug 13, 2025

CodSpeed Instrumentation Performance Report

Merging #13048 will not alter performance

Comparing 08-13-feat_codegen_allow_attaching_comment_to_the_top_of_the_file (b1a6ba0) with main (73a6f25)1

Summary

✅ 34 untouched benchmarks

Footnotes

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

@graphite-app
Copy link
Contributor

graphite-app bot commented Aug 13, 2025

Merge activity

  • Aug 13, 4:17 AM UTC: Boshen added this pull request to the Graphite merge queue.
  • Aug 13, 4:18 AM UTC: The Graphite merge queue couldn't merge this PR because it failed for an unknown reason.
  • Aug 13, 4:19 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.

@graphite-app graphite-app bot force-pushed the 08-13-feat_codegen_allow_attaching_comment_to_the_top_of_the_file branch from a9667d6 to b1a6ba0 Compare August 13, 2025 04:17
@Boshen Boshen merged commit 2c5fa58 into main Aug 13, 2025
24 checks passed
@Boshen Boshen deleted the 08-13-feat_codegen_allow_attaching_comment_to_the_top_of_the_file branch August 13, 2025 04:18
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-codegen Area - Code Generation C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

codegen: attach comments to span: 0

2 participants