Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ Deploy Preview for rolldown-rs canceled.
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the size issue when enabling strictExecutionOrder by changing when and how wrapped modules are pulled on demand. Key changes include:
- Modifying variable naming and duplicate assertions in test files for module import order.
- Updating side‐effect flags in the linking stages (wrapping.rs and reference_needed_symbols.rs) to ensure correct module initialization.
- Introducing and propagating a new symbol chain map (normal_symbol_exports_chain_map) in several stages for improved export resolution.
Reviewed Changes
Copilot reviewed 63 out of 63 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| crates/rolldown/tests/esbuild/packagejson/package_json_browser_index_no_ext/bypass.md | Adjusts variable naming and assert order in test scenarios. |
| crates/rolldown/tests/esbuild/packagejson/package_json_browser_index_no_ext/artifacts.snap | Updates snapshot file in line with bypass.md changes. |
| crates/rolldown/tests/esbuild/importstar_ts/ts_import_star_and_common_js/diff.md | Removes a duplicate initialization call and adjusts logging of module export values. |
| crates/rolldown/tests/esbuild/importstar/import_star_and_common_js/diff.md | Switches from direct logging to assertions for module export validation. |
| crates/rolldown/tests/esbuild/default/top_level_await_forbidden_require*_bypass.md/artifacts.snap | Removes dead branch initializations to prevent unnecessary code execution. |
| crates/rolldown/tests/esbuild/default/minified_exports_and_module_format_common_js/* | Reorders and renames export variables for consistency in CommonJS formats. |
| crates/rolldown/tests/esbuild/default/exports_and_module_format_common_js/* | Fixes variable naming order and updates assertions to ensure expected output. |
| crates/rolldown/tests/esbuild/dce/package_json_side_effects_/ | Removes duplicate module initialization calls and aligns side-effect handling. |
| crates/rolldown/src/stages/link_stage/wrapping.rs | Changes the side_effect flag from false to true to trigger module wrapping on demand. |
| crates/rolldown/src/stages/link_stage/tree_shaking/include_statements.rs | Extends symbol resolution by chaining normal symbol exports for statement inclusion. |
| crates/rolldown/src/stages/link_stage/reference_needed_symbols.rs | Updates side-effect condition assignment with added tracing info for reexport conditions. |
| crates/rolldown/src/stages/link_stage/mod.rs | Adds a new field for normal_symbol_exports_chain_map to support export chaining. |
| crates/rolldown/src/stages/link_stage/bind_imports_and_exports.rs | Assigns the newly created normal_symbol_exports_chain_map to the LinkStage instance. |
Comments suppressed due to low confidence (3)
crates/rolldown/src/stages/link_stage/reference_needed_symbols.rs:178
- The side-effect determination logic has been updated; please verify that the new condition correctly reflects the intended module initialization behavior.
stmt_info.side_effect = is_reexport_all || importee.side_effects.has_side_effects();
crates/rolldown/src/stages/link_stage/wrapping.rs:199
- Changing the 'side_effect' flag to true may affect module initialization order. Please ensure that this change is thoroughly validated with integration tests.
side_effect: true,
crates/rolldown/tests/esbuild/packagejson/package_json_browser_index_no_ext/bypass.md:42
- Duplicate assertion for browser$1 detected; please verify if two identical assertions are intentional.
assert.equal(browser$1, "browser");
crates/rolldown/src/stages/link_stage/bind_imports_and_exports.rs
Outdated
Show resolved
Hide resolved
f297242 to
ec34a68
Compare
hyf0
commented
May 26, 2025
hyf0
commented
May 26, 2025
...tests/esbuild/dce/package_json_side_effects_false_keep_bare_import_and_require_es6/bypass.md
Show resolved
Hide resolved
hyf0
commented
May 26, 2025
crates/rolldown/tests/esbuild/default/exports_and_module_format_common_js/artifacts.snap
Show resolved
Hide resolved
ec34a68 to
aa8f7e6
Compare
5cb4012 to
bcdfe7d
Compare
hyf0
commented
May 27, 2025
It's getting rate limited, and I also read issues actively, so remove it.
bcdfe7d to
bfca2c5
Compare
IWANABETHATGUY
approved these changes
May 27, 2025
Contributor
Benchmarks Rust
|
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.

Description
This PR fixes the size problem of enabling
strictExecutionOrderat #3981.Fixes #3981.