You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Split exports info by compilation phase to avoid whole-map snapshots
#15517
ExportsInfoData mixes reusable export facts with mutable state from later compilation phases: provided exports, re-export targets, runtime usage, mangling constraints, and inline/rename decisions.
Incremental compilation currently snapshots the entire exports-info map after finish_modules and restores it before the next rebuild. Later passes modify more than usage: side-effects optimization rewrites targets, and some plugins also change provided information. Clearing usage alone cannot replace the snapshot.
Proposed direction
Keep reusable export facts owned by export analysis; recompute affected modules during incremental builds.
Separate initial usage requirements (e.g. library exports), per-build usage results, optimization overrides, and inline/rename decisions.
Provide a combined read-only view and phase-specific write APIs. Preserve late usage updates from plugins such as RSC.
Remove the whole-map snapshot once later phases no longer mutate reusable facts. Verify incremental output against clean builds, especially when exports, re-export targets, or usage change.
This targets data ownership and deep copies; Arc handle clones are out of scope.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Problem
ExportsInfoDatamixes reusable export facts with mutable state from later compilation phases: provided exports, re-export targets, runtime usage, mangling constraints, and inline/rename decisions.Incremental compilation currently snapshots the entire exports-info map after
finish_modulesand restores it before the next rebuild. Later passes modify more than usage: side-effects optimization rewrites targets, and some plugins also change provided information. Clearing usage alone cannot replace the snapshot.Proposed direction
This targets data ownership and deep copies; Arc handle clones are out of scope.
Code references
All reactions