-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Mark previously deferred assets as dirty for symbol prop #9369
Conversation
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.
Nice one! Love those problems that take days of digging only to result in a tiny change to fix.
} | ||
|
||
async.js: | ||
// Trigger more deps so a full 'propagateSymbolsUp' pass is executed |
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.
Do you know why this only happens if the full pass runs? Feels odd to me
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.
There are other circumstances that can cause this to occur outside of a full pass, however this was the easiest way to reflect in a test. The reason is fails though is because the full pass only applies to propagateSymbolsUp. However, in this case there are nodes that are not re-visited by propagateSymbolsDown and contain stale data.
↪️ Pull Request
This PR fixes an issue in incremental symbol propagation + lazy mode builds where you have a lazy asset that depends on an asset which is also lazy itself. The issue occurs because
propagateSymbolsDown
is skipped butpropagateSymbolsUp
runs after the lazy bundle is requested. This can cause an incorrect "X does not export 'Y'" error to show as theusedSymbolsDown
property has not been populated correctly.This fix here is to mark previously deferred assets and their dependencies as changed/dirty so symbol propagation knows to re-process them.
✔️ PR Todo