fix: call resolveFileUrl in a deterministic order#10330
Conversation
How to use the Graphite Merge QueueAdd the label graphite: merge-when-ready to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
4002120 to
18fba61
Compare
3b64dfc to
09b3d1e
Compare
Merging this PR will not alter performance
Comparing Footnotes
|
hyfdev
left a comment
There was a problem hiding this comment.
The single-chunk traversal is now compatible, but the entry-first chunk traversal still reverses Rollup’s resolveFileUrl order for split builds. Stateful hooks therefore receive and assign values to chunks in the opposite order.
Separately, the title and description call the hook renderFileUrl; the public name is resolveFileUrl.
hyfdev
left a comment
There was a problem hiding this comment.
The chunk, module, and occurrence traversals are stable, and the regression test shows that the hook no longer depends on module discovery order. Exact cross-chunk Rollup parity is not required, so the manual-chunk difference does not block this change.\n\nThe renderFileUrl name and the Rollup-alignment wording overstate the implementation’s guarantee; those are non-blocking documentation notes.
renderFileUrl in a deterministic orderresolveFileUrl in a deterministic order
Merge activity
|
The `resolveFileUrl` hook was not called in a deterministic order. This PR traverses chunks and modules in their stable sorted order, so hook invocation no longer depends on module discovery order.
09b3d1e to
afac8ae
Compare
7ceb442 to
ce98ae7
Compare

The
resolveFileUrlhook was not called in a deterministic order. This PR traverses chunks and modules in their stable sorted order, so hook invocation no longer depends on module discovery order.