Skip to content

fix: should increase the counter of sized in mangle exports plugin#12044

Merged
LingyuCoder merged 1 commit intomainfrom
fix/mangle-exports-sized
Oct 31, 2025
Merged

fix: should increase the counter of sized in mangle exports plugin#12044
LingyuCoder merged 1 commit intomainfrom
fix/mangle-exports-sized

Conversation

@LingyuCoder
Copy link
Contributor

@LingyuCoder LingyuCoder commented Oct 30, 2025

Summary

Fix bug of 'mangleExports: size'. The counter did not increase when the name of export info is accepted, that make every mangled name the same.

Related links

Checklist

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

Copilot AI review requested due to automatic review settings October 30, 2025 12:24
@netlify
Copy link

netlify bot commented Oct 30, 2025

Deploy Preview for rspack ready!

Name Link
🔨 Latest commit c746b4f
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/690358f9d122f00008ba9811
😎 Deploy Preview https://deploy-preview-12044--rspack.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Oct 30, 2025
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 pull request enables previously skipped tests by fixing underlying issues and adjusting test expectations. The main change is a critical bug fix in the mangle exports plugin that corrects the counter increment position to prevent incorrect name generation.

  • Fixes a bug in the mangle exports plugin where the counter was incremented after the collision check instead of before
  • Enables 13 previously disabled tests by removing their test filter files
  • Updates test configurations and expectations to match actual rspack behavior differences from webpack

Reviewed Changes

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
crates/rspack_plugin_javascript/src/plugin/mangle_exports_plugin.rs Fixes counter increment position in export name generation loop
tests/rspack-test/configCases/mangle/mangle-with-object-prop/test.filter.js Removes test skip - test now passes
tests/rspack-test/configCases/mangle/mangle-with-object-prop/test.config.js Formats array return for better readability
tests/rspack-test/configCases/mangle/mangle-with-object-prop/rspack.config.js Adds inlineConst: false to prevent constant inlining affecting mangle tests
tests/rspack-test/configCases/mangle/mangle-with-object-prop/index.js Comments out CJS mangle tests pending future support
tests/rspack-test/configCases/loaders/options/test.filter.js Removes test skip - loader validation now works
tests/rspack-test/configCases/loaders/options/errors.js Comments out loader validation expectations pending schema support
tests/rspack-test/configCases/loaders/import-attributes-and-reexport/test.filter.js Removes test skip - reexport behavior now correct
tests/rspack-test/configCases/loaders/hash-in-context/test.filter.js Changes FIXME to TODO for unimplemented feature
tests/rspack-test/configCases/loaders-and-plugins-falsy/basic/test.filter.js Removes test skip - validation now passes
tests/rspack-test/configCases/library/module-reexport-external/test.filter.js Enables test by returning true
tests/rspack-test/configCases/library/module-reexport-external/rspack.config.js Updates assertion to match rspack's different export format
tests/rspack-test/configCases/library/modern-module-reexport-type/test.filter.js Removes test skip - timeout issue resolved
tests/rspack-test/configCases/json/bailout-flag-dep-export-perf/test.filter.js Removes test skip - JSON parser support now available
tests/rspack-test/configCases/issues/issue-7563/test.filter.js Removes test skip - hash length support now available
tests/rspack-test/configCases/inner-graph/issue-12669/test.filter.js Removes test skip - exports now correct
tests/rspack-test/configCases/inner-graph/issue-12669/rspack.config.js Comments out missing exports and adds TODO comment
tests/rspack-test/configCases/inner-graph/issue-12669/module.js Reformats indentation for consistency
tests/rspack-test/configCases/errors/multi-entry-missing-module/test.config.js Updates comment to clarify webpack/rspack difference
tests/rspack-test/configCases/errors/generator-generate-error/test.filter.js Enables test by returning true
tests/rspack-test/configCases/errors/generator-generate-error/index.js Updates assertion to match rspack's asset handling
tests/rspack-test/configCases/errors/case-emit/test.filter.js Changes FIXME to TODO for unimplemented feature
tests/rspack-test/configCases/errors/asset-options-validation/test.filter.js Changes FIXME to TODO for unimplemented feature
tests/rspack-test/configCases/entry/weird-names2/test.filter.js Changes FIXME to TODO with typo in "wired"
tests/rspack-test/configCases/entry/weird-names/test.filter.js Changes FIXME to TODO with typo in "wired"
tests/rspack-test/configCases/deprecations/config/test.filter.js Removes test skip - deprecation now working

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

@github-actions
Copy link
Contributor

📦 Binary Size-limit

Comparing c746b4f to chore: release 1.6.0 (#12042) by Fy

🙈 Size remains the same at 47.84MB

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 30, 2025

CodSpeed Performance Report

Merging #12044 will not alter performance

Comparing fix/mangle-exports-sized (c746b4f) with main (2a67107)1

Summary

✅ 17 untouched

Footnotes

  1. No successful run was found on main (17e360a) during the generation of this report, so 2a67107 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@LingyuCoder LingyuCoder requested a review from JSerFeng October 30, 2025 14:10
@LingyuCoder LingyuCoder enabled auto-merge (squash) October 30, 2025 14:14
@LingyuCoder LingyuCoder merged commit 0ff711f into main Oct 31, 2025
79 of 81 checks passed
@LingyuCoder LingyuCoder deleted the fix/mangle-exports-sized branch October 31, 2025 06:29
@h-a-n-a h-a-n-a mentioned this pull request Nov 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments