Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jan 15, 2026

@camc314 camc314 marked this pull request as ready for review January 15, 2026 14:13
@github-actions github-actions bot added the A-minifier Area - Minifier label Jan 15, 2026
Copy link
Contributor Author

camc314 commented Jan 15, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


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.

@codspeed-hq
Copy link

codspeed-hq bot commented Jan 15, 2026

Merging this PR will not alter performance

✅ 38 untouched benchmarks
⏩ 7 skipped benchmarks1


Comparing c/01-15-fix_mangler_reserve_names_from_eval-containing_scopes (29ad0e5) with c/01-15-fix_minifier_preserve_return_value_of___pure___iife_in_return_statements (17630cd)

Open in CodSpeed

Footnotes

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

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 fixes a bug where the mangler could incorrectly shadow variables from scopes containing eval() calls. The fix ensures that variable names from eval-containing scopes are reserved and not reused as mangled names in other scopes.

Changes:

  • Added collection of reserved names from eval-containing scopes during slot assignment
  • Updated name generation to check against eval-reserved names to prevent shadowing
  • Added comprehensive test cases covering various eval scenarios

Reviewed changes

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

File Description
crates/oxc_mangler/src/lib.rs Implements eval-reserved name tracking by collecting variable names from eval scopes and excluding them from the mangled name pool
crates/oxc_minifier/tests/mangler/mod.rs Adds helper test function and new test cases to verify correct behavior with eval in various scope configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@camc314 camc314 force-pushed the c/01-15-fix_mangler_reserve_names_from_eval-containing_scopes branch from cc2e0cc to 29ad0e5 Compare January 15, 2026 15:15
@Boshen Boshen added the 0-merge Merge with Graphite Merge Queue label Jan 16, 2026
Copy link
Member

Boshen commented Jan 16, 2026

Merge activity

  • Jan 16, 5:20 AM UTC: The merge label '0-merge' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Jan 16, 5:20 AM UTC: Boshen added this pull request to the Graphite merge queue.

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-minifier Area - Minifier C-bug Category - Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants