Skip to content

fix: multiple runtime keys broke filename in runtime module#10144

Merged
LingyuCoder merged 3 commits intomainfrom
fix/get-main-filename-runtime
Apr 24, 2025
Merged

fix: multiple runtime keys broke filename in runtime module#10144
LingyuCoder merged 3 commits intomainfrom
fix/get-main-filename-runtime

Conversation

@LingyuCoder
Copy link
Contributor

Summary

fix #9902

If a chunk belongs to runtime which has multiple runtime keys, and the filename template of this chunk has [runtime] in it, the generated filename will be broken by the \n.

Checklist

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

@LingyuCoder LingyuCoder requested review from ahabhgk and Copilot April 23, 2025 11:49
@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 Apr 23, 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 fixes an issue where filenames were broken due to multiple runtime keys being joined with newline characters.

  • Updated the runtime key concatenation delimiter from a newline to an underscore.
Comments suppressed due to low confidence (1)

crates/rspack_core/src/runtime.rs:132

  • Changing the join delimiter from a newline to an underscore fixes the filename breakage issue. Verify that no downstream dependencies rely on the newline delimiter to avoid unexpected side effects.
self.key = ordered.join("_")

@netlify
Copy link

netlify bot commented Apr 23, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 0369c36
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6809aa875c7fa80008e64847

@codspeed-hq
Copy link

codspeed-hq bot commented Apr 23, 2025

CodSpeed Performance Report

Merging #10144 will not alter performance

Comparing fix/get-main-filename-runtime (0369c36) with main (ef69e07)

Summary

✅ 11 untouched benchmarks

@LingyuCoder LingyuCoder disabled auto-merge April 24, 2025 02:48
@LingyuCoder LingyuCoder enabled auto-merge (squash) April 24, 2025 03:35
@LingyuCoder LingyuCoder merged commit 790e1cb into main Apr 24, 2025
30 checks passed
@LingyuCoder LingyuCoder deleted the fix/get-main-filename-runtime branch April 24, 2025 04:17
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.

[Bug]: Using the same web worker script from two different entry points triggers a Runtime error in dev

3 participants