Skip to content

fix: respect RSPACK_BINDING in loader workers#14775

Merged
hardfist merged 1 commit into
mainfrom
codex/fix-parallel-loader-binding
Jul 14, 2026
Merged

fix: respect RSPACK_BINDING in loader workers#14775
hardfist merged 1 commit into
mainfrom
codex/fix-parallel-loader-binding

Conversation

@hardfist

Copy link
Copy Markdown
Contributor

Summary

  • apply the custom binding rewrite to both dist/index.js and dist/worker.js
  • ensure the main compiler and parallel-loader workers load the same binding when RSPACK_BINDING is set
  • fix the post-build hook, which previously processed only the main entry bundle
  • checked with the @rspack/core build, generated bundle assertions, Prettier, and Rslint

Related links

Checklist

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

@github-actions

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 7715a2b to fix(fs): include paths in native filesystem errors (#14760) by hardfist

🙈 Size remains the same at 66.51MB

@codspeed-hq

codspeed-hq Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 43 untouched benchmarks
⏩ 47 skipped benchmarks1


Comparing codex/fix-parallel-loader-binding (7715a2b) with main (cfa680e)

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.

@hardfist hardfist marked this pull request as ready for review July 14, 2026 04:10
Copilot AI review requested due to automatic review settings July 14, 2026 04:10
@hardfist hardfist merged commit 03465ca into main Jul 14, 2026
56 of 58 checks passed
@hardfist hardfist deleted the codex/fix-parallel-loader-binding branch July 14, 2026 04:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 packaging/runtime mismatch in @rspack/core where Tinypool loader-worker processes could ignore RSPACK_BINDING, causing the main compiler and worker threads to load different native bindings in the same Node process.

Changes:

  • Extend the post-build codemod rewrite to apply to both dist/index.js and dist/worker.js.
  • Ensure the loader-worker bundle uses the same process.env.RSPACK_BINDING override logic as the main entry output.

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

Comment thread packages/rspack/rslib.config.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7715a2bb7d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/rspack/rslib.config.ts
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.

[Bug]: RSPACK_BINDING is ignored by parallel-loader workers

3 participants