Skip to content

Conversation

@CPunisher
Copy link
Contributor

@CPunisher CPunisher commented Jan 4, 2026

Summary

This PR removes the HELPERS (SWC transform helpers) from the Ast context and the minification logic in rspack_javascript_compiler.

This simplifies the AST handling and removes unnecessary overhead from SWC helpers that were not being utilized.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings January 4, 2026 06:14
@netlify
Copy link

netlify bot commented Jan 4, 2026

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 21a4788
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/695b5dea67a2fa0008d95ca1

@github-actions github-actions bot added team The issue/pr is created by the member of Rspack. release: refactor labels Jan 4, 2026
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 removes unused SWC helper infrastructure from the Ast context and minification logic, simplifying code paths that don't require helper injection capabilities.

  • Removes HelperData from the Context struct in the AST module
  • Eliminates HELPERS.set wrappers from AST transform/view methods and the minification process
  • Cleans up related imports in both affected files

The JavaScriptTransformer in transform.rs correctly retains HELPERS support, as it processes external SWC plugins that may inject helpers.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/rspack_javascript_compiler/src/compiler/minify.rs Removes HELPERS.set wrapper from minification logic and cleans up the helpers import
crates/rspack_javascript_compiler/src/ast.rs Removes HelperData field from Context struct, eliminates HELPERS.set calls in transform/view methods, and updates Debug implementation

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

@CPunisher CPunisher changed the title refactor: remove unused SWC helpers from Ast context and minifier refactor: remove unused SWC helpers Jan 4, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
react-10k 5.7 MB 0
react-1k 825.4 KB 0
react-5k 2.7 MB 0
rome 984.3 KB 0
ui-components 2.1 MB 0

Generated by Rsdoctor GitHub Action

@github-actions
Copy link
Contributor

github-actions bot commented Jan 4, 2026

📦 Binary Size-limit

Comparing 21a4788 to refactor: simplify export info types by removing MaybeDynamicTargetExportInfo (#12601) by harpsealjs

🎉 Size decreased by 4.13KB from 47.87MB to 47.87MB (⬇️0.01%)

@CPunisher CPunisher force-pushed the 01-04-refactor/remove-helpers branch from 1fd6668 to 66fe048 Compare January 4, 2026 06:26
@codspeed-hq
Copy link

codspeed-hq bot commented Jan 4, 2026

CodSpeed Performance Report

Merging #12614 will not alter performance

Comparing 01-04-refactor/remove-helpers (21a4788) with main (6a1fbdd)

Summary

✅ 16 untouched
⏩ 1 skipped1

Footnotes

  1. 1 benchmark was skipped, so the baseline result was used instead. If it was deleted from the codebase, click here and archive it to remove it from the performance reports.

@CPunisher CPunisher requested a review from stormslowly as a code owner January 4, 2026 09:47
@CPunisher CPunisher force-pushed the 01-04-refactor/remove-helpers branch from b68473e to f309a3e Compare January 4, 2026 10:03
@CPunisher CPunisher force-pushed the 01-04-refactor/remove-helpers branch from f309a3e to 21a4788 Compare January 5, 2026 06:44
@CPunisher CPunisher merged commit cd97e3b into main Jan 5, 2026
81 of 83 checks passed
@CPunisher CPunisher deleted the 01-04-refactor/remove-helpers branch January 5, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: refactor team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants