Skip to content

Comments

feat(dev): initialize rolldown_plugin_lazy_compilation#7488

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-14-feat_dev_initialize_rolldown_plugin_lazy_compilation_
Dec 15, 2025
Merged

feat(dev): initialize rolldown_plugin_lazy_compilation#7488
graphite-app[bot] merged 1 commit intomainfrom
12-14-feat_dev_initialize_rolldown_plugin_lazy_compilation_

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Dec 14, 2025

No description provided.

Copy link
Member Author

hyf0 commented Dec 14, 2025


How to use the Graphite Merge Queue

Add the label graphite: merge 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.

@netlify
Copy link

netlify bot commented Dec 14, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit cb2af59
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/693f6d0f7496c10008e3bc5a

@github-actions
Copy link
Contributor

github-actions bot commented Dec 14, 2025

Benchmarks Rust

  • target: main(418a6fb)
  • pr: 12-14-feat_dev_initialize_rolldown_plugin_lazy_compilation_(cb2af59)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     60.4±2.34ms        ? ?/sec    1.01     60.8±1.71ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     67.0±1.61ms        ? ?/sec    1.00     66.4±2.21ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    101.3±1.92ms        ? ?/sec    1.01    102.5±1.51ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    114.9±1.48ms        ? ?/sec    1.03    117.8±1.67ms        ? ?/sec
bundle/bundle@threejs                                        1.00     38.1±2.24ms        ? ?/sec    1.02     38.7±2.25ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     42.0±0.78ms        ? ?/sec    1.01     42.3±0.70ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    384.2±5.18ms        ? ?/sec    1.00    384.0±5.40ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    450.9±4.44ms        ? ?/sec    1.02   459.1±12.23ms        ? ?/sec
scan/scan@rome_ts                                            1.00     78.1±1.16ms        ? ?/sec    1.02     80.0±1.19ms        ? ?/sec
scan/scan@threejs                                            1.00     27.2±0.30ms        ? ?/sec    1.03     28.0±2.01ms        ? ?/sec
scan/scan@threejs10x                                         1.00    279.5±2.92ms        ? ?/sec    1.01    283.2±5.27ms        ? ?/sec

@hyf0 hyf0 marked this pull request as ready for review December 14, 2025 10:55
Copilot AI review requested due to automatic review settings December 14, 2025 10:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces the rolldown_plugin_lazy_compilation plugin to enable lazy compilation for dynamic imports as part of the development workflow. This feature allows dynamic imports to be compiled on-demand rather than upfront, improving build performance during development.

Key Changes

  • Added a new rolldown_plugin_lazy_compilation crate that implements lazy module compilation by intercepting dynamic imports and replacing them with stub modules
  • Extended HmrOptions with a lazy field to enable/disable lazy compilation
  • Created example files demonstrating the lazy compilation feature with multiple entry points and dynamic imports

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
crates/rolldown_plugin_lazy_compilation/Cargo.toml Defines the new plugin crate with dependencies on arcstr, rolldown_common, rolldown_plugin, and rolldown_utils
crates/rolldown_plugin_lazy_compilation/src/lib.rs Exports the LazyCompilationPlugin
crates/rolldown_plugin_lazy_compilation/src/lazy_compilation_plugin.rs Implements the plugin that tracks lazy entries and provides stub modules for dynamic imports
crates/rolldown_common/src/inner_bundler_options/types/hmr_options.rs Adds the lazy option to HmrOptions
crates/rolldown_binding/src/options/binding_input_options/binding_experimental_options.rs Updates binding conversion to handle the new lazy field (currently hardcoded to None)
crates/rolldown/src/utils/apply_inner_plugins.rs Integrates LazyCompilationPlugin when lazy option is enabled
crates/rolldown/examples/lazy.rs Example demonstrating lazy compilation with multiple entry points
crates/rolldown/examples/lazy/*.js Example JavaScript files showing dynamic import patterns
crates/rolldown_testing/_config.schema.json Schema update for the lazy configuration option
Cargo.toml Adds workspace member and dependency entries for the new plugin
Cargo.lock Lock file updates for the new dependency

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI review requested due to automatic review settings December 15, 2025 01:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.

Comments suppressed due to low confidence (1)

crates/rolldown/examples/lazy.rs:24

  • Extra blank lines at the end of the file should be removed to maintain consistency with the codebase.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member Author

hyf0 commented Dec 15, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 12-14-feat_dev_initialize_rolldown_plugin_lazy_compilation_ branch from 41e9f4d to cb2af59 Compare December 15, 2025 02:06
@graphite-app graphite-app bot merged commit cb2af59 into main Dec 15, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 12-14-feat_dev_initialize_rolldown_plugin_lazy_compilation_ branch December 15, 2025 02:35
This was referenced Dec 17, 2025
shulaoda added a commit that referenced this pull request Dec 17, 2025
## [1.0.0-beta.55] - 2025-12-17

### 🚀 Features

- add validation errors for incompatible `inlineDynamicImports` options (#7539) by @Copilot
- rolldown_plugin_vite_reporter: truncate long importer lists in ineffective dynamic import warnings (#7528) by @Copilot
- export `memfs` from `rolldown/experimental` for browser builds (#7490) by @Copilot
- implement `postBanner` and `postFooter` (#7487) by @sevenc-nanashi
- port getLogFilter helper from Rollup for advanced log filtering (#6890) by @taearls
- dev: initialize `rolldown_plugin_lazy_compilation` (#7488) by @hyf0
- enable `experimental.transform_hires_sourcemap: 'boundary'` by default (#7478) by @sapphi-red
- apply merge CJS namespace optimizations more generally (#7475) by @sapphi-red

### 🐛 Bug Fixes

- avoid panic on invalid values for `output.exports`, `output.format`, `output.hash_characters` (#7542) by @sapphi-red
- handle `__proto__` export for module namespace correctly (#7534) by @sapphi-red
- handle `__proto__` export correctly (#7533) by @sapphi-red
- rolldown_plugin_vite_resolve: acquire resolver lock before package json resolution (#7524) by @sapphi-red
- disable syntax transform optimization for `minify: 'dce-only'` (#7520) by @sapphi-red
- arrow function expression keep names (#7519) by @IWANABETHATGUY
- skip symbols that are imported from other module when deconflicting module symbols (#7510) by @IWANABETHATGUY
- preserve class names in assignment expressions with keepNames option (#7491) by @IWANABETHATGUY
- accessor with decorators should be kept (#7499) by @Copilot
- rolldown_plugin_vite_reporter: support `Infinity` for chunk_limit (#7497) by @shulaoda
- change filename template validation errors from UNHANDLEABLE_ERROR to INVALID_OPTION (#7472) by @Copilot
- `no entry found for key` error when merging CJS namespace exports (#7474) by @sapphi-red
- generate output with syntax error when wrapped esm module using tla syntax (#7468) by @IWANABETHATGUY

### 🚜 Refactor

- dev: rename `experimental.hmr` to `experimental.devMode` (#7527) by @hyf0
- pass addon option to rust as it is (#7526) by @hyf0
- remove unused stmtinfo meta flag (#7518) by @IWANABETHATGUY

### 📚 Documentation

- clarify `closeBundle` behavior (#7525) by @sapphi-red

### 🧪 Testing

- add tests for static string postBanner and postFooter (#7516) by @Copilot
- disable pluginTimings in Rust integration tests to avoid snapshot noise (#7485) by @shulaoda
- port Rollup JSX tests to `crates/rolldown/tests/rollup` (#7480) by @sapphi-red
- re-triage some esbuild JSX preserve tests (#7479) by @sapphi-red
- disable pluginTimings by default to avoid snapshot noise (#7471) by @shulaoda

### ⚙️ Miscellaneous Tasks

- mark feature that will not be supported as ignored in rollup test status (#7535) by @sapphi-red
- support `banner`/`footer`/`intro`/`outro` for config variants (#7532) by @sapphi-red
- `dce/dce_of_decorators` esbuild test is now passing (#7531) by @sapphi-red
- deps: update github-actions (major) (#7495) by @renovate[bot]
- deps: update npm packages (#7493) by @renovate[bot]
- add a check to verify failedReasons are updated (#7521) by @sapphi-red
- deps: update test262 submodule for tests (#7523) by @sapphi-red
- deps: update taiki-e/install-action action to v2.63.2 (#7496) by @renovate[bot]
- deps: update oxc apps (#7511) by @renovate[bot]
- deps: update oxc to v0.103.0 (#7513) by @camc314
- fix format in `.github/instructions/bug-investigation.instructions.md` (#7506) by @sapphi-red
- add instructions for REPL decoding (#7502) by @sapphi-red
- deps: update github-actions (#7492) by @renovate[bot]
- deps: cargo-shear v1.9.0 (#7483) by @Boshen
- deps: update dependency oxlint-tsgolint to v0.9.0 (#7484) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.8.6 (#7470) by @renovate[bot]
- add syntax validation for test output chunks that are not executed (#7466) by @IWANABETHATGUY
- deps: update dependency rust to v1.92.0 (#7467) by @renovate[bot]
- deps: update test262 submodule for tests (#7457) by @sapphi-red

### ❤️ New Contributors

* @sevenc-nanashi made their first contribution in [#7487](#7487)
* @taearls made their first contribution in [#6890](#6890)

Co-authored-by: shulaoda <[email protected]>
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.

2 participants