Skip to content

refactor(minifier): make KeepVar builder methods generic over GetAstBuilder#24035

Merged
graphite-app[bot] merged 1 commit into
mainfrom
refactor/keep-var-generic-ast-builder
Jul 2, 2026
Merged

refactor(minifier): make KeepVar builder methods generic over GetAstBuilder#24035
graphite-app[bot] merged 1 commit into
mainfrom
refactor/keep-var-generic-ast-builder

Conversation

@Dunqing

@Dunqing Dunqing commented Jul 2, 2026

Copy link
Copy Markdown
Member

Migrates the two remaining &AstBuilder parameters in KeepVar to the new builder API convention (&B where B: GetAstBuilder), continuing #23832 / #23833.

This also resolves the pedantic trivially_copy_pass_by_ref warning that fires in default-features clippy runs (cargo clippy -p oxc_minifier -- -D warnings), where AstBuilder is Copy. It could not be fixed by taking AstBuilder by value, because under disable_old_builder (enabled for this crate's tests) it is not Copy; the generic signature is clean in both configurations.

Dunqing commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

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-minifier Area - Minifier label Jul 2, 2026
@codspeed-hq

codspeed-hq Bot commented Jul 2, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 52 untouched benchmarks
⏩ 19 skipped benchmarks1


Comparing refactor/keep-var-generic-ast-builder (8251f17) with main (f27bbc7)

Open in CodSpeed

Footnotes

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

@Dunqing Dunqing marked this pull request as ready for review July 2, 2026 03:10
@Dunqing Dunqing added the 0-merge Merge with Graphite Merge Queue label Jul 2, 2026

Dunqing commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Merge activity

…uilder (#24035)

Migrates the two remaining `&AstBuilder` parameters in `KeepVar` to the new builder API convention (`&B where B: GetAstBuilder`), continuing #23832 / #23833.

This also resolves the pedantic `trivially_copy_pass_by_ref` warning that fires in default-features clippy runs (`cargo clippy -p oxc_minifier -- -D warnings`), where `AstBuilder` is `Copy`. It could not be fixed by taking `AstBuilder` by value, because under `disable_old_builder` (enabled for this crate's tests) it is not `Copy`; the generic signature is clean in both configurations.
@graphite-app graphite-app Bot force-pushed the refactor/keep-var-generic-ast-builder branch from 8251f17 to 68e724a Compare July 2, 2026 03:11
@graphite-app graphite-app Bot merged commit 68e724a into main Jul 2, 2026
29 checks passed
@graphite-app graphite-app Bot removed the 0-merge Merge with Graphite Merge Queue label Jul 2, 2026
@graphite-app graphite-app Bot deleted the refactor/keep-var-generic-ast-builder branch July 2, 2026 03:15
camc314 pushed a commit that referenced this pull request Jul 3, 2026
…uilder (#24035)

Migrates the two remaining `&AstBuilder` parameters in `KeepVar` to the new builder API convention (`&B where B: GetAstBuilder`), continuing #23832 / #23833.

This also resolves the pedantic `trivially_copy_pass_by_ref` warning that fires in default-features clippy runs (`cargo clippy -p oxc_minifier -- -D warnings`), where `AstBuilder` is `Copy`. It could not be fixed by taking `AstBuilder` by value, because under `disable_old_builder` (enabled for this crate's tests) it is not `Copy`; the generic signature is clean in both configurations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-minifier Area - Minifier

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant