Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ast): derive Clone for TemplateElement and TemplateElementValue #8658

Conversation

Dunqing
Copy link
Member

@Dunqing Dunqing commented Jan 22, 2025

In #8614, we need to duplicate the same template literal, and derive Copy and Clone to avoid using CloneIn.

Copy link
Member Author

Dunqing commented Jan 22, 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.

@github-actions github-actions bot added A-ast Area - AST C-enhancement Category - New feature or request labels Jan 22, 2025
@Dunqing Dunqing changed the title feat(ast): derive Clone and Copy for TemplateElement and TemplateElementValue feat(ast): derive Clone and Copy for TemplateElement and TemplateElementValue Jan 22, 2025
@Dunqing Dunqing marked this pull request as ready for review January 22, 2025 14:28
Copy link

codspeed-hq bot commented Jan 22, 2025

CodSpeed Performance Report

Merging #8658 will not alter performance

Comparing 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue (233dc07) with main (39dbd2d)

Summary

✅ 32 untouched benchmarks

Copy link
Contributor

@overlookmotel overlookmotel left a comment

Choose a reason for hiding this comment

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

Would just Clone be sufficient? TemplateElement is 48 bytes. That's a bit big to be Copy.

@overlookmotel overlookmotel changed the base branch from 01-22-refactor_transformer_move_create_prototype_member_to_utils_module to graphite-base/8658 January 22, 2025 15:51
@overlookmotel overlookmotel force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from 2d79a31 to e2bb198 Compare January 22, 2025 15:56
@overlookmotel overlookmotel changed the base branch from graphite-base/8658 to main January 22, 2025 15:57
@overlookmotel overlookmotel force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from e2bb198 to b73f8a8 Compare January 22, 2025 15:57
@Dunqing Dunqing force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from b73f8a8 to f0ed208 Compare January 22, 2025 16:21
@github-actions github-actions bot added the A-transformer Area - Transformer / Transpiler label Jan 22, 2025
@Dunqing Dunqing changed the title feat(ast): derive Clone and Copy for TemplateElement and TemplateElementValue feat(ast): derive Clone for TemplateElement and TemplateElementValue Jan 22, 2025
@Dunqing
Copy link
Member Author

Dunqing commented Jan 22, 2025

Would just Clone be sufficient? TemplateElement is 48 bytes. That's a bit big to be Copy.

Yes, it is enough.

@Dunqing Dunqing force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from f0ed208 to d287a61 Compare January 23, 2025 03:08
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 24, 2025
Copy link
Member

Boshen commented Jan 24, 2025

Merge activity

  • Jan 23, 10:47 PM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 23, 10:47 PM EST: A user added this pull request to the Graphite merge queue.
  • Jan 23, 11:04 PM EST: A user merged this pull request with the Graphite merge queue.

Boshen pushed a commit that referenced this pull request Jan 24, 2025
…alue` (#8658)

In #8614, we need to duplicate the same template literal, and derive `Copy` and `Clone` to avoid using `CloneIn`.
@Boshen Boshen force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from d287a61 to e2412c8 Compare January 24, 2025 03:53
…alue` (#8658)

In #8614, we need to duplicate the same template literal, and derive `Copy` and `Clone` to avoid using `CloneIn`.
@Boshen Boshen force-pushed the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch from e2412c8 to 233dc07 Compare January 24, 2025 03:58
@graphite-app graphite-app bot merged commit 233dc07 into main Jan 24, 2025
25 checks passed
@graphite-app graphite-app bot deleted the 01-22-feat_ast_derive_clone_and_copy_for_templateelement_and_templateelementvalue branch January 24, 2025 04:04
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-transformer Area - Transformer / Transpiler C-enhancement Category - New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants