Mark previously deferred assets as dirty for symbol prop#9369
Merged
Conversation
marcins
approved these changes
Nov 12, 2023
marcins
left a comment
Contributor
There was a problem hiding this comment.
Nice one! Love those problems that take days of digging only to result in a tiny change to fix.
mischnic
reviewed
Nov 12, 2023
| } | ||
|
|
||
| async.js: | ||
| // Trigger more deps so a full 'propagateSymbolsUp' pass is executed |
Member
There was a problem hiding this comment.
Do you know why this only happens if the full pass runs? Feels odd to me
Contributor
Author
There was a problem hiding this comment.
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.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
↪️ 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
propagateSymbolsDownis skipped butpropagateSymbolsUpruns after the lazy bundle is requested. This can cause an incorrect "X does not export 'Y'" error to show as theusedSymbolsDownproperty has not been populated correctly.flowchart LR Main -.-> Async Main -.-> SharedAsync Async --> SharedAsyncThis fix here is to mark previously deferred assets and their dependencies as changed/dirty so symbol propagation knows to re-process them.
✔️ PR Todo