Skip to content

fix: entry dependency passed to addInclude should be used in module graph#9476

Merged
SyMind merged 11 commits intomainfrom
fix-entry-dep-add-include
Feb 28, 2025
Merged

fix: entry dependency passed to addInclude should be used in module graph#9476
SyMind merged 11 commits intomainfrom
fix-entry-dep-add-include

Conversation

@SyMind
Copy link
Copy Markdown
Member

@SyMind SyMind commented Feb 26, 2025

Summary

fix: entry dependency passed to addInclude should be used in module graph

const dependency = EntryPlugin.createDependency(path.resolve(__dirname, "foo.js"));
compilation.addInclude(compiler.context, dependency, {}, () => {
    const module = compilation.moduleGraph.getModule(dependency); // should get the module
});

rewrite Symbol.hasInstance for Dependency class to impl entryDependency instanceof Dependency.

Checklist

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

@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 Feb 26, 2025
@netlify
Copy link
Copy Markdown

netlify bot commented Feb 26, 2025

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit 45931eb
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/67c175aa243b7a00080d5492

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 26, 2025

CodSpeed Performance Report

Merging #9476 will improve performances by ×2.6

Comparing fix-entry-dep-add-include (45931eb) with main (e875ced)

🎉 Hooray! codspeed-rust just leveled up to 2.7.2!

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

⚡ 2 improvements
✅ 5 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
Traverse module graph by connections 361.4 µs 331.7 µs +8.96%
Traverse module graph by dependencies 1,517.2 µs 574.2 µs ×2.6

@SyMind SyMind force-pushed the fix-entry-dep-add-include branch 2 times, most recently from 586294c to 2bccd91 Compare February 27, 2025 03:13
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch from 2bccd91 to ca658e4 Compare February 27, 2025 03:33
@ahabhgk ahabhgk requested a review from hardfist February 27, 2025 06:14
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch from 2cc8e06 to 271c556 Compare February 27, 2025 08:28
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch 3 times, most recently from df1f783 to aaef082 Compare February 27, 2025 17:39
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch from aaef082 to e1b748b Compare February 27, 2025 17:40
@SyMind SyMind requested a review from jerrykingxyz as a code owner February 28, 2025 03:38
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch 2 times, most recently from f9376e6 to 7b6bc6e Compare February 28, 2025 03:48
@SyMind SyMind force-pushed the fix-entry-dep-add-include branch from 7b6bc6e to d0fd901 Compare February 28, 2025 04:35
@SyMind SyMind merged commit 5269446 into main Feb 28, 2025
27 checks passed
@SyMind SyMind deleted the fix-entry-dep-add-include branch February 28, 2025 09:02
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.

3 participants