Skip to content

fix: eval source map panic at getting codegen results#9862

Merged
ahabhgk merged 3 commits intomainfrom
fix-eval-source-map-panic
Apr 1, 2025
Merged

fix: eval source map panic at getting codegen results#9862
ahabhgk merged 3 commits intomainfrom
fix-eval-source-map-panic

Conversation

@ahabhgk
Copy link
Copy Markdown
Contributor

@ahabhgk ahabhgk commented Apr 1, 2025

Summary

fix #9840
fix #9837

code_generation_results.get_hash(&module.identifier(), None) => code_generation_results.get_hash(&module.identifier(), Some(chunk.runtime()))

The only usage for explicitly using None is

// Here we need the asset module's runtime to get the code generation result, which is not equal to
// the css module's runtime, but actually multiple runtime optimization doesn't affect asset module,
// in different runtime asset module will always have the same code generation result, so we use
// `runtime: None` to get the only one code generation result
let code_gen_result = compilation.code_generation_results.get(identifier, None);

should always pass the chunk.runtime()

Checklist

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

@ahabhgk ahabhgk enabled auto-merge (squash) April 1, 2025 07:28
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 1, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 7d9211f
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67eb9580f7819c00086991aa

@github-actions github-actions bot added the team The issue/pr is created by the member of Rspack. label Apr 1, 2025
@ahabhgk ahabhgk requested review from JSerFeng and LingyuCoder April 1, 2025 07:31
@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Apr 1, 2025
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 1, 2025

CodSpeed Performance Report

Merging #9862 will not alter performance

Comparing fix-eval-source-map-panic (7d9211f) with main (2e7b961)

🎉 Hooray! codspeed-node just leveled up to 4.0.0!

A heads-up, this is a breaking change and it might affect your current performance baseline a bit. But here's the exciting part - it's packed with new, cool features and promises improved result stability 🥳!
Curious about what's new? Visit our releases page to delve into all the awesome details about this new version.

Summary

✅ 8 untouched benchmarks

@ahabhgk ahabhgk merged commit 73de9b4 into main Apr 1, 2025
43 checks passed
@ahabhgk ahabhgk deleted the fix-eval-source-map-panic branch April 1, 2025 07:56
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]: 1.3.0 RuntimeIdRuntimeModule must be in a single runtime [Bug]: 1.3.0 panic, No unique code generation entry for unspecified runtime

2 participants