Skip to content

Conversation

Austaras
Copy link
Contributor

@Austaras Austaras commented Sep 17, 2025

Summary

Related links

#11595

Checklist

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

Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit e827f37
🔍 Latest deploy log https://app.netlify.com/projects/rspack/deploys/68cac638be146400086d74ae

@github-actions github-actions bot added the release: bug fix release: bug related release(mr only) label Sep 17, 2025
@Austaras
Copy link
Contributor Author

I have tested locally to verfiy that it fixed the issue. But I fail to see how to add a proper test.

Copy link

codspeed-hq bot commented Sep 17, 2025

CodSpeed Performance Report

Merging #11693 will not alter performance

Comparing Austaras:main (e827f37) with main (95c56d3)

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

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

✅ 17 untouched

@jerrykingxyz
Copy link
Contributor

You can try this test case. 0ec163a

@jerrykingxyz
Copy link
Contributor

jerrykingxyz commented Sep 17, 2025

You can use it by running npm run test:base -- -t "lib-symlink" under test/rspack-test.
I suggest you create a new project and copy the code in the test to debug and verify, because of some logs may be lost in rspack_test.

@Austaras
Copy link
Contributor Author

I suggest you create a new project and copy the code in the test to debug and verify

I figure it out myself. It's also easier to compare it with webpack.

let build_info = module.build_info_mut();
build_info
.file_dependencies
.extend(file_dependencies.iter().map(|f| f.clone().into()));
Copy link
Contributor

Choose a reason for hiding this comment

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

file_dependencies belong to the current dependency, not the module. Setting this here is unreasonable. If the module already exists, the value of this part may even be discarded. The correct approach is to make factorizeInfo effective for all dependencies.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But compilation calcuates modules that need rebuild using buildInfo.

The correct approach is to make factorizeInfo effective for all dependencies.

Could you elaborate on this?

Copy link
Contributor Author

@Austaras Austaras Sep 18, 2025

Choose a reason for hiding this comment

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

Ah, if I understand #11643 correctly, it could be possible to leverage FactorizeInfo for this scenario.

Copy link
Contributor

Choose a reason for hiding this comment

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

BuildInfo is used to check if a module needs to be rebuilt, and factorizeInfo is used to check if a dependency needs to be refactorize. The dependencies you add to buildInfo should actually be added to factorizeInfo, and rebuilding the dependencies will also fix this problem.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it seems that repack only rebuild failed dependencies at the moment.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, #11643 will fix it and check all dependencies factorizeinfo when rebuilding.

@jerrykingxyz
Copy link
Contributor

jerrykingxyz commented Sep 18, 2025

I think #11643 may can fix the bug. We can wait for the above PR to be merged.

@Austaras
Copy link
Contributor Author

I think #11643 may can fix the bug. We can wait for the above PR to be merged.

I've tested on #11643 and it cannot fix this issue. But I'm sure this PR could be updated upon #11643.

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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants