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

refactor(ast): rename #[estree(add_entry)] to #[estree(add_fields)] #8926

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Feb 6, 2025

#8921 introduced attribute to add extra fields to a struct in ESTree AST #[estree(add_entry(...))]. Rename it to #[estree(add_fields(...))], as that's more descriptive of what it does.

@github-actions github-actions bot added A-ast Area - AST A-ast-tools Area - AST tools C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior labels Feb 6, 2025
Copy link
Contributor Author

overlookmotel commented Feb 6, 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.

@overlookmotel overlookmotel marked this pull request as ready for review February 6, 2025 12:59
@overlookmotel overlookmotel force-pushed the 02-06-refactor_ast_rename_estree_add_entry_to_estree_add_fields_ branch from 973893c to 3d7ce31 Compare February 6, 2025 13:02
Copy link

codspeed-hq bot commented Feb 6, 2025

CodSpeed Performance Report

Merging #8926 will not alter performance

Comparing 02-06-refactor_ast_rename_estree_add_entry_to_estree_add_fields_ (647a288) with main (4a723f1)

Summary

✅ 33 untouched benchmarks

@overlookmotel
Copy link
Contributor Author

overlookmotel commented Feb 6, 2025

@hi-ogawa It'd be ideal if we could specify the name, value, and TS type for extra fields in one place, instead of the repetition in #[estree(add_fields(blah = Whatever), add_ts("blah: Whatever"))].

But I can't see a good way to encode that in attributes right now. We can revisit this. But regardless, the functionality provided by #[estree(add_fields)] is a good addition. Thank you.

@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Feb 6, 2025
Copy link
Member

Boshen commented Feb 6, 2025

Merge activity

  • Feb 6, 10:07 AM EST: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Feb 6, 10:07 AM EST: A user added this pull request to the Graphite merge queue.
  • Feb 6, 10:29 AM EST: A user merged this pull request with the Graphite merge queue.

…]` (#8926)

#8921 introduced attribute to add extra fields to a struct in ESTree AST `#[estree(add_entry(...))]`. Rename it to `#[estree(add_fields(...))]`, as that's more descriptive of what it does.
@graphite-app graphite-app bot force-pushed the 02-06-refactor_ast_tools_store_lists_as_vec_s_not_option_vec_s branch from f4b2acd to ab601a1 Compare February 6, 2025 15:15
@graphite-app graphite-app bot force-pushed the 02-06-refactor_ast_rename_estree_add_entry_to_estree_add_fields_ branch from 3d7ce31 to 647a288 Compare February 6, 2025 15:15
Base automatically changed from 02-06-refactor_ast_tools_store_lists_as_vec_s_not_option_vec_s to main February 6, 2025 15:27
@graphite-app graphite-app bot merged commit 647a288 into main Feb 6, 2025
27 checks passed
@graphite-app graphite-app bot deleted the 02-06-refactor_ast_rename_estree_add_entry_to_estree_add_fields_ branch February 6, 2025 15:29
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 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.

None yet

2 participants