Skip to content

refactor(ast_tools): simplify StructsAndEnums iterator#20941

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/04-01-refactor_ast_tools_simplify_structsandenums_iterator
Apr 1, 2026
Merged

refactor(ast_tools): simplify StructsAndEnums iterator#20941
graphite-app[bot] merged 1 commit intomainfrom
om/04-01-refactor_ast_tools_simplify_structsandenums_iterator

Conversation

@overlookmotel
Copy link
Copy Markdown
Member

@overlookmotel overlookmotel commented Apr 1, 2026

Refactor. Simplify and shorten the code for StructsAndEnums iterator in ast_tools.

Copy link
Copy Markdown
Member Author

overlookmotel commented Apr 1, 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.

@github-actions github-actions Bot added the A-ast-tools Area - AST tools label Apr 1, 2026
@github-actions github-actions Bot added the C-cleanup Category - technical debt or refactoring. Solution not expected to change behavior label Apr 1, 2026
@overlookmotel overlookmotel marked this pull request as ready for review April 1, 2026 18:00
Copilot AI review requested due to automatic review settings April 1, 2026 18:00
Copy link
Copy Markdown
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 StructsAndEnums iterator implementation in ast_tools to remove usage of oxc_data_structures::slice_iter::SliceIter and simplify iteration logic.

Changes:

  • Simplified StructsAndEnums::next() implementation in tasks/ast_tools/src/schema/mod.rs.
  • Removed the oxc_data_structures dependency (and corresponding lockfile entry).
  • Updated the generated AST changes watch list to no longer include crates/oxc_data_structures.

Reviewed changes

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

File Description
tasks/ast_tools/src/schema/mod.rs Refactors StructsAndEnums to use slice::Iter and a shorter next() implementation.
tasks/ast_tools/Cargo.toml Removes direct dependency on oxc_data_structures.
Cargo.lock Removes oxc_data_structures from ast_tools dependency list.
.github/generated/ast_changes_watch_list.yml Drops oxc_data_structures paths from the AST watch list.

Comment thread tasks/ast_tools/src/schema/mod.rs
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 1, 2026

Merging this PR will not alter performance

✅ 48 untouched benchmarks
⏩ 8 skipped benchmarks1


Comparing om/04-01-refactor_ast_tools_simplify_structsandenums_iterator (4f23c14) with main (299e96c)

Open in CodSpeed

Footnotes

  1. 8 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.

@overlookmotel overlookmotel self-assigned this Apr 1, 2026
@graphite-app graphite-app Bot added the 0-merge Merge with Graphite Merge Queue label Apr 1, 2026
@graphite-app
Copy link
Copy Markdown
Contributor

graphite-app Bot commented Apr 1, 2026

Merge activity

Refactor. Simplify and shorten the code for `StructsAndEnums` iterator in `ast_tools`.
@graphite-app graphite-app Bot force-pushed the om/04-01-refactor_ast_tools_simplify_structsandenums_iterator branch from 4f23c14 to b782a4b Compare April 1, 2026 18:13
@graphite-app graphite-app Bot merged commit b782a4b into main Apr 1, 2026
27 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Apr 1, 2026
@graphite-app graphite-app Bot deleted the om/04-01-refactor_ast_tools_simplify_structsandenums_iterator branch April 1, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

2 participants