-
-
Notifications
You must be signed in to change notification settings - Fork 781
fix: add symlink to file dep #11693
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix: add symlink to file dep #11693
Conversation
✅ Deploy Preview for rspack canceled.Built without sensitive environment variables
|
I have tested locally to verfiy that it fixed the issue. But I fail to see how to add a proper test. |
CodSpeed Performance ReportMerging #11693 will not alter performanceComparing 🎉 Hooray!
|
You can try this test case. 0ec163a |
You can use it by running |
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())); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I think #11643 may can fix the bug. We can wait for the above PR to be merged. |
Summary
Related links
#11595
Checklist