Skip to content

fix: preserve reexport call context in concatenation - #15247

Merged
LingyuCoder merged 1 commit into
mainfrom
seal/faster-concat-output-parity
Aug 19, 2026
Merged

LingyuCoder merged 1 commit into
mainfrom
seal/faster-concat-output-parity

Conversation

@LingyuCoder

Copy link
Copy Markdown
Contributor

Summary

  • Preserve the consuming import expression's call and ASI semantics while faster module concatenation follows a structured direct re-export.
  • Strengthen the existing CommonJS interop case with a strict, this-sensitive default export.

Faster module concatenation previously used the re-export edge's fixed call and asi_safe metadata when resolving the final binding. This discarded the consuming import's context and could render a CommonJS default call as getter.a(...) instead of getter()(...), changing the function's this value.

After this fix, enabling or disabling experiments.fasterModuleConcatenation produces byte-for-byte identical output across all five projects in rstackjs/build-tools-performance (react-1k, react-5k, react-10k, popular-libs, and ui-components).

Related links

Validation

  • pnpm run build:binding:dev
  • pnpm run test:unit (9208 passed, 4 skipped)
  • cargo fmt --all --check
  • Cold-cache faster on/off output comparison for all rstackjs/build-tools-performance projects; the full output tree is byte-for-byte identical

Checklist

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

@LingyuCoder
LingyuCoder marked this pull request as ready for review August 19, 2026 07:22
@LingyuCoder
LingyuCoder requested a review from JSerFeng August 19, 2026 07:23
@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing c17be40 to chore(vscode): use Rstack extension as default formatter (#15245) by Jiahan Chen

🙈 Size remains the same at 68.11MB

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 5 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Gzip Size Change Gzip Change
popular-libs 1.7 MB 556.5 KB 0 0
react-10k 5.6 MB 1.3 MB 0 0
react-1k 823.1 KB 218.4 KB 0 0
react-5k 2.7 MB 669.3 KB 0 0
ui-components 4.9 MB 1.4 MB 0 0

Generated by Rsdoctor GitHub Action

@LingyuCoder
LingyuCoder enabled auto-merge (squash) August 19, 2026 07:46
@LingyuCoder
LingyuCoder merged commit 9b0005d into main Aug 19, 2026
44 checks passed
@LingyuCoder
LingyuCoder deleted the seal/faster-concat-output-parity branch August 19, 2026 08:20
@codspeed

codspeed Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 50 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing seal/faster-concat-output-parity (c17be40) with main (77f4caa)

Open in CodSpeed

Footnotes

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

LingyuCoder added a commit that referenced this pull request Aug 21, 2026
Reverts #14852 and #15247 while retaining the module code generation cache integration added afterward.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants