Consider sibling in available assets to younger sibling for parallel deps #8414
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.
Parallel siblings are guaranteed to have the previous sibling's assets loaded on the page before the younger sibling. So for the following example,
b.js
will have any assetsa
loaded &a
In the experimental bundler, along with using shared bundles, we also will "reuse" bundles that match
💻 Examples
This is what currently (without a fix) happens. Though, the bundles themselves are correct, we unnecessarily draw edges from
b.js
toa.js
in an attempt to reuse a bundle that is shared between parent and sibling.This is how it should look. The way we currently determine asset availability is by propagating down availability from all ancestors -> to all parents -> to child, intersecting away assets as we go. For parallel deps, we union the set of assets loaded by sibling
a
with siblingb
and neglected to add the bundleRoot , or in this casea.js
to the set of assets available tob.js
🚨 Test instructions
✔️ PR Todo