Repository navigation
fix(strict-execution-order): wrap eager modules that forward wrapped definers - #11186
Merged
Merged
Conversation
hyfdev
changed the base branch from
hyfdev/seo-init-reachability-20261008
to
hyfdev/11151-retained-init-timing-20261011
October 12, 2026 06:04
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
hyfdev
changed the base branch from
hyfdev/11151-retained-init-timing-20261011
to
hyfdev/seo-init-reachability-20261008
October 12, 2026 06:07
8 of 22 tasks
hyfdev
force-pushed
the
hyfdev/10294-forwarded-definer-init-20261012
branch
from
October 12, 2026 06:27
591f121 to
27cde68
Compare
Base automatically changed from
hyfdev/seo-init-reachability-20261008
to
main
October 12, 2026 06:39
hyfdev
force-pushed
the
hyfdev/10294-forwarded-definer-init-20261012
branch
2 times, most recently
from
October 13, 2026 07:56
73df5c4 to
24da912
Compare
hyfdev
marked this pull request as ready for review
October 13, 2026 08:01
Merging this PR will not alter performance
|
hyfdev
force-pushed
the
hyfdev/10294-forwarded-definer-init-20261012
branch
2 times, most recently
from
October 14, 2026 03:41
52233c2 to
fbd3f65
Compare
IWANABETHATGUY
approved these changes
Oct 19, 2026
Member
Author
Merge activity
|
…definers (#11186) Under on-demand wrapping, a re-exported snapshot can observe a later mutation even though its forwarding module is imported at startup. This change preserves initialization order when that forwarding module retains local initialization code. ```js // state.js export let state = 0; export function bump() { state++; } // value.js import { state } from './state.js'; export const SNAPSHOT = state; // shared.js export { SNAPSHOT } from './value.js'; export const LOCAL = 'local'; // main.js import { LOCAL } from './shared.js'; import { bump } from './state.js'; export const local = LOCAL; bump(); export const load = () => import('./lazy.js').then((m) => m.SNAPSHOT); // lazy.js export { SNAPSHOT } from './shared.js'; ``` Enable `strictExecutionOrder` and `experimental.onDemandWrapping`, preserve entry exports with `preserveEntrySignatures: 'allow-extension'`, and place only `value.js` in a manual chunk group with `includeDependenciesRecursively: false`. With these settings, `await load()` returned `1`; it returns `0`. Here, tree shaking removes the re-export statement, and eager `shared.js` emits no call to initialize `value.js`. The on-demand planner wraps modules whose initializers would call an already selected wrapper, repeating through forwarding chains. It resolves those calls with every eligible module wrapped, since wrapping determines which module owns a re-export's initialization. Transparent forwarding modules, whose wrappers own no initialization calls, and mixed modules dropped by constant inlining have separate initialization gaps in both strict modes, tracked in #10294. Part of #10294.
graphite-app
Bot
force-pushed
the
hyfdev/10294-forwarded-definer-init-20261012
branch
from
October 19, 2026 14:59
fbd3f65 to
8a5792f
Compare
Merged
shulaoda
added a commit
that referenced
this pull request
Oct 21, 2026
## [1.2.15] - 2026-10-21 ### 🚀 Features - rolldown_plugin_vite_resolve: add `isBundled` to pick the browser-external stub format (#11260) by @h-a-n-a - dev: mark entry modules in the HMR module graph (#11252) by @h-a-n-a - mark module starts with `// <id>` comments instead of `#region` pairs (#11235) by @IWANABETHATGUY ### 🐛 Bug Fixes - plugin: stop `this.resolve` recursion between plugins with `skipSelf: true` (#11181) by @anzal1 - rolldown_plugin_vite_resolve: handle external `require` for `ssr.target: 'webworker'` (#11205) by @sapphi-red - rolldown_plugin_vite_build_import_analysis: only wrap dynamic imports with static specifiers in __vitePreload (#10879) by @smeng9 - strict-execution-order: wrap eager modules that forward wrapped definers (#11186) by @hyfdev - chunk-import-map: keep common chunk keys unique when enabling inline common chunks (#11230) by @hyfdev - only register signal-exit handler when a trace subscriber is active (#11208) by @DaniilIsupov ### 🧪 Testing - fold hand-unrolled Rust test tables (#11212) by @Brooooooklyn ### ⚙️ Miscellaneous Tasks - deps: upgrade oxc to 0.155.0 (#11228) by @Dunqing - rollup-tests: retriage failed tests (#11251) by @sapphi-red - deps: update rollup submodule for tests to v4.64.12 (#11249) by @rolldown-guard[bot] - deps: update test262 submodule for tests (#11242) by @rolldown-guard[bot] ### ❤️ New Contributors * @anzal1 made their first contribution in [#11181](#11181) * @smeng9 made their first contribution in [#10879](#10879) * @DaniilIsupov made their first contribution in [#11208](#11208) Co-authored-by: shulaoda <[email protected]>
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.
Under on-demand wrapping, a re-exported snapshot can observe a later mutation even though its forwarding module is imported at startup. This change preserves initialization order when that forwarding module retains local initialization code.
Enable
strictExecutionOrderandexperimental.onDemandWrapping, preserve entry exports withpreserveEntrySignatures: 'allow-extension', and place onlyvalue.jsin a manual chunk group withincludeDependenciesRecursively: false. With these settings,await load()returned1; it returns0.Here, tree shaking removes the re-export statement, and eager
shared.jsemits no call to initializevalue.js. The on-demand planner wraps modules whose initializers would call an already selected wrapper, repeating through forwarding chains. It resolves those calls with every eligible module wrapped, since wrapping determines which module owns a re-export's initialization.Transparent forwarding modules, whose wrappers own no initialization calls, and mixed modules dropped by constant inlining have separate initialization gaps in both strict modes, tracked in #10294.
Part of #10294.