Skip to content

fix(format/cjs): exported bindings should be lived. Part1#1791

Merged
hyf0 merged 1 commit intomainfrom
07-30-fix_format_cjs_exported_bindings_should_be_lived
Jul 30, 2024
Merged

fix(format/cjs): exported bindings should be lived. Part1#1791
hyf0 merged 1 commit intomainfrom
07-30-fix_format_cjs_exported_bindings_should_be_lived

Conversation

@hyf0
Copy link
Copy Markdown
Member

@hyf0 hyf0 commented Jul 30, 2024

Description

@hyf0 hyf0 marked this pull request as ready for review July 30, 2024 10:08
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not complete fix, there are still problems in wrapped entires.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current pattern for cross-chunk imports const { ... } = require('...') in cjs format doesn't create live binding compared to esm import.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jul 30, 2024

Benchmarks Rust

  • target: main(ae0de61)
  • pr: 07-30-fix_format_cjs_exported_bindings_should_be_lived(9458662)
group                                                               pr                                     target
-----                                                               --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol                     1.00     51.2±0.77ms        ? ?/sec    1.03     52.6±1.18ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify              1.02     70.3±1.20ms        ? ?/sec    1.00     68.9±1.40ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-minify-sourcemap    1.00     88.0±0.82ms        ? ?/sec    1.00     87.9±1.65ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap           1.00     61.5±0.58ms        ? ?/sec    1.00     61.3±1.08ms        ? ?/sec
bundle/bundle@rome-ts                                               1.01     94.1±0.94ms        ? ?/sec    1.00     93.1±2.28ms        ? ?/sec
bundle/bundle@rome-ts-minify                                        1.02    156.3±4.07ms        ? ?/sec    1.00    152.8±3.16ms        ? ?/sec
bundle/bundle@rome-ts-minify-sourcemap                              1.01    201.7±3.49ms        ? ?/sec    1.00    198.9±3.41ms        ? ?/sec
bundle/bundle@rome-ts-sourcemap                                     1.02    113.9±1.01ms        ? ?/sec    1.00    111.4±1.37ms        ? ?/sec
bundle/bundle@threejs                                               1.01     28.6±0.51ms        ? ?/sec    1.00     28.3±0.87ms        ? ?/sec
bundle/bundle@threejs-minify                                        1.08     64.9±1.09ms        ? ?/sec    1.00     60.2±1.25ms        ? ?/sec
bundle/bundle@threejs-minify-sourcemap                              1.00     82.3±1.30ms        ? ?/sec    1.01     82.8±1.17ms        ? ?/sec
bundle/bundle@threejs-sourcemap                                     1.05     40.0±1.38ms        ? ?/sec    1.00     38.2±0.62ms        ? ?/sec
bundle/bundle@threejs10x                                            1.00    309.4±3.77ms        ? ?/sec    1.01    312.3±2.85ms        ? ?/sec
bundle/bundle@threejs10x-minify                                     1.01   695.3±14.77ms        ? ?/sec    1.00    688.8±7.56ms        ? ?/sec
bundle/bundle@threejs10x-minify-sourcemap                           1.01   927.6±10.57ms        ? ?/sec    1.00    915.6±7.20ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                                  1.03    416.0±6.24ms        ? ?/sec    1.00    405.2±8.39ms        ? ?/sec
remapping/remapping                                                 1.00     32.2±0.49ms        ? ?/sec    1.02     32.8±0.15ms        ? ?/sec
remapping/render-chunk-remapping                                    1.00     83.2±0.40ms        ? ?/sec    1.00     83.3±0.34ms        ? ?/sec
scan/scan@rome-ts                                                   1.01     74.5±0.70ms        ? ?/sec    1.00     73.9±0.97ms        ? ?/sec
scan/scan@threejs                                                   1.00     20.4±0.24ms        ? ?/sec    1.01     20.6±0.59ms        ? ?/sec
scan/scan@threejs10x                                                1.03    213.8±2.46ms        ? ?/sec    1.00    208.3±1.99ms        ? ?/sec

@hyf0 hyf0 force-pushed the 07-30-fix_format_cjs_exported_bindings_should_be_lived branch from 0e9b8df to 5b0238b Compare July 30, 2024 10:30
@hyf0 hyf0 force-pushed the 07-30-test_rust_preserve_semantic_of_entries_exports_add_named_export_in_wrapped_and_shared_entries_ branch from 80fae47 to be5cf43 Compare July 30, 2024 11:57
@hyf0 hyf0 force-pushed the 07-30-fix_format_cjs_exported_bindings_should_be_lived branch from 5b0238b to bb52a46 Compare July 30, 2024 11:57
@hyf0 hyf0 force-pushed the 07-30-test_rust_preserve_semantic_of_entries_exports_add_named_export_in_wrapped_and_shared_entries_ branch from be5cf43 to 8583fbd Compare July 30, 2024 12:24
Base automatically changed from 07-30-test_rust_preserve_semantic_of_entries_exports_add_named_export_in_wrapped_and_shared_entries_ to main July 30, 2024 12:44
@hyf0 hyf0 force-pushed the 07-30-fix_format_cjs_exported_bindings_should_be_lived branch from bb52a46 to 9458662 Compare July 30, 2024 12:45
@netlify
Copy link
Copy Markdown

netlify Bot commented Jul 30, 2024

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 9458662
🔍 Latest deploy log https://app.netlify.com/sites/rolldown-rs/deploys/66a8e06e1cd10b0008686b8a

Copy link
Copy Markdown
Member Author

hyf0 commented Jul 30, 2024

Merge activity

  • Jul 30, 8:46 AM EDT: Graphite rebased this pull request after merging its parent, because this pull request is set to merge when ready.

@hyf0 hyf0 self-assigned this Jul 30, 2024
@hyf0 hyf0 added this pull request to the merge queue Jul 30, 2024
Merged via the queue into main with commit 17ca21d Jul 30, 2024
@hyf0 hyf0 deleted the 07-30-fix_format_cjs_exported_bindings_should_be_lived branch July 30, 2024 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant