Skip to content

refactor(rust): remove old watch mode implementation#8525

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-02-refactor_rust_remove_old_watch_mode_implementation
Mar 2, 2026
Merged

refactor(rust): remove old watch mode implementation#8525
graphite-app[bot] merged 1 commit intomainfrom
03-02-refactor_rust_remove_old_watch_mode_implementation

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Mar 2, 2026

No description provided.

Copy link
Member Author

hyf0 commented Mar 2, 2026

@hyf0 hyf0 marked this pull request as ready for review March 2, 2026 15:07
Copilot AI review requested due to automatic review settings March 2, 2026 15:07
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 removes the old, now-superseded watch mode implementation from crates/rolldown (the watch/ submodule and the watcher.rs facade), following the successful replacement with the new rolldown_watcher crate. It also updates the migration-status documentation and fixes a stale cargo-run comment in the new watcher's example.

Changes:

  • Deletes all old watcher source files (crates/rolldown/src/watch/ and crates/rolldown/src/watcher.rs) and removes their public re-exports from crates/rolldown/src/lib.rs.
  • Cleans up the crates/rolldown/Cargo.toml by removing the rolldown-notify and rolldown_watcher dependencies that were only needed by the old implementation.
  • Updates meta/design/watch-mode.md migration checklist to remove completed items, and fixes the cargo run comment in crates/rolldown_watcher/examples/watch.rs.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/rolldown/src/watch/emitter.rs Deleted: old WatcherEmitter implementation
crates/rolldown/src/watch/event.rs Deleted: old WatcherEvent/BundleEvent types
crates/rolldown/src/watch/watcher.rs Deleted: old WatcherImpl and wait_for_change
crates/rolldown/src/watch/watcher_task.rs Deleted: old WatcherTask implementation
crates/rolldown/src/watch/mod.rs Deleted: module declaration file for old watch submodule
crates/rolldown/src/watcher.rs Deleted: old Watcher public facade
crates/rolldown/src/lib.rs Removes mod watch, mod watcher, and their re-exports
crates/rolldown/Cargo.toml Removes rolldown-notify and rolldown_watcher dev-dependencies
crates/rolldown/examples/watch.rs Deleted: old example that used the removed Watcher API
crates/rolldown_watcher/Cargo.toml Adds rolldown_workspace and sugar_path dev-dependencies (needed for the example)
crates/rolldown_watcher/examples/watch.rs Fixes the cargo run comment to reference the correct crate/example name
meta/design/watch-mode.md Removes completed checklist items; keeps only outstanding tasks
Cargo.lock Reflects dependency additions/removals

@github-actions
Copy link
Contributor

github-actions bot commented Mar 2, 2026

Benchmarks Rust

  • target: 03-02-perf_init_tokio_runtime_with_4_blocking_threads(2db94c4)
  • pr: 03-02-refactor_rust_remove_old_watch_mode_implementation(c1fd676)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     80.3±1.71ms        ? ?/sec    1.02     81.9±2.04ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.01     90.6±2.21ms        ? ?/sec    1.00     90.0±2.23ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    160.2±3.76ms        ? ?/sec    1.01    162.5±4.52ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    181.5±4.88ms        ? ?/sec    1.03    187.8±7.87ms        ? ?/sec
bundle/bundle@threejs                                        1.03     75.1±3.67ms        ? ?/sec    1.00     73.2±2.76ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.03     81.6±1.64ms        ? ?/sec    1.00     79.3±1.19ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00   787.9±10.85ms        ? ?/sec    1.00   787.5±18.26ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00   893.9±12.05ms        ? ?/sec    1.00   889.6±11.22ms        ? ?/sec
scan/scan@rome_ts                                            1.00     77.0±1.83ms        ? ?/sec    1.01     77.6±1.74ms        ? ?/sec
scan/scan@threejs                                            1.00     27.1±0.43ms        ? ?/sec    1.01     27.5±1.71ms        ? ?/sec
scan/scan@threejs10x                                         1.00    269.8±3.53ms        ? ?/sec    1.01    272.5±3.39ms        ? ?/sec

@graphite-app
Copy link
Contributor

graphite-app bot commented Mar 2, 2026

Merge activity

@graphite-app graphite-app bot force-pushed the 03-02-perf_init_tokio_runtime_with_4_blocking_threads branch from f838133 to 2db94c4 Compare March 2, 2026 15:38
@graphite-app graphite-app bot force-pushed the 03-02-refactor_rust_remove_old_watch_mode_implementation branch from b77facc to c1fd676 Compare March 2, 2026 15:38
Base automatically changed from 03-02-perf_init_tokio_runtime_with_4_blocking_threads to main March 2, 2026 15:51
@graphite-app graphite-app bot merged commit c1fd676 into main Mar 2, 2026
33 checks passed
@graphite-app graphite-app bot deleted the 03-02-refactor_rust_remove_old_watch_mode_implementation branch March 2, 2026 15:51
This was referenced Mar 4, 2026
shulaoda added a commit that referenced this pull request Mar 5, 2026
## [1.0.0-rc.7] - 2026-03-05

⚡ Smarter Code Generation Defaults
- DCE-only minification and smart constant inlining are now enabled by default
- Produces cleaner, smaller output bundles without requiring explicit configuration

💡 LLM-Friendly Bundle Analyzer Reports
- New markdown output format for the bundle analyzer plugin with bundle summaries, module graphs, dependency chains, and optimization suggestions
- Optimization suggestions now also recommend using the entriesAware option when common chunks contain modules only reachable from specific entries


### 💥 BREAKING CHANGES

- enable minify: 'dce-only' by default (#8465) by @IWANABETHATGUY
- settings `inlineConst: { mode: 'smart', pass: 1}`  by default (#8444) by @IWANABETHATGUY

### 🚀 Features

- binding: add original getter to BindingMagicString (#8533) by @IWANABETHATGUY
- native-magic-string: add `offset` property support (#8531) by @IWANABETHATGUY
- add `output.strict` option to control `"use strict"` directive emission (#8489) by @Copilot
- watch: expose `watcher.compareContentsForPolling` (#8526) by @hyf0
- watch: use new watcher to support watch mode (#8475) by @hyf0
- rust/watch: handle bulk-change (#8466) by @hyf0
- add LLM-friendly markdown output format to bundle analyzer plugin (#8242) by @IWANABETHATGUY

### 🐛 Bug Fixes

- expose `plugins` on `NormalizedInputOptions` for `buildStart` hook (#8521) by @Copilot
- only uppercase facade symbols in JSX preserve mode (#8519) by @IWANABETHATGUY
- binding: export BindingResult in generated dts header (#8537) by @minsoo-web
- pre-resolve paths option to avoid `invoke_sync` deadlock (#8518) by @IWANABETHATGUY
- remove debug-only jsx_preset and UntranspiledSyntaxError (#8511) by @IWANABETHATGUY
- apply `topLevelVar` to exported `const`/`let` declarations (#8507) by @IWANABETHATGUY
- rolldown_plugin_vite_web_worker_post: avoid replacing `new.target` (#8488) by @sapphi-red
- update copyright year to 2026 (#8486) by @maciekzygmunt

### 🚜 Refactor

- rust: use Oxc's SymbolFlags::ConstVariable instead of custom IsConst flag (#8543) by @Dunqing
- rust: remove FacadeScoping, use Scoping::create_symbol for facade symbols (#8540) by @Dunqing
- rust/watch: remove hacky `reset_closed_for_watch_mode` (#8530) by @hyf0
- binding: return &str instead of String in filename() getter (#8534) by @IWANABETHATGUY
- rust: remove old watch mode implementation (#8525) by @hyf0
- rust/watch: simply watch logic in the binding layer (#8516) by @hyf0
- rust/watch: tweak struct/function names (#8464) by @hyf0

### 📚 Documentation

- explain how external modules work in rolldown (#8457) by @sapphi-red
- add some diagrams using graphviz (#8499) by @sapphi-red
- use `vitepress-plugin-graphviz` (#8498) by @sapphi-red
- list s390x/ppc64le prebuilt binaries (#8495) by @crusty-voidzero
- fix error type for `RolldownBuild.generate` and others (#8490) by @sapphi-red

### ⚡ Performance

- string_wizard: reduce allocations and add ASCII fast paths (#8541) by @IWANABETHATGUY
- use IndexBitSet to replace IndexVec<XXXIdx, bool> for module/stmt inclusion tracking (#8503) by @IWANABETHATGUY
- plugin: use IndexBitSet to optimize skipped plugins checking (#8497) by @ShroXd
- rust/tla: skip compute_tla if there is no module use TLA (#8487) by @ShroXd

### 🧪 Testing

- node/watch: make watch tests run in concurrent and retry-able (#8512) by @hyf0
- add test case for static flag tree-shaking (#8476) by @IWANABETHATGUY
- migrate post-banner sourcemap-with-shebang to Rust (#8477) by @Copilot

### ⚙️ Miscellaneous Tasks

- vscode: `formatOnSave` for markdown files using oxc formatter (#8536) by @minsoo-web
- deps: update test262 submodule for tests (#8528) by @sapphi-red
- remove `retry` workaround from output paths test fixtures (#8520) by @Copilot
- docs: add Shuyuan Wang (h-a-n-a) and remove from acknowledgements (#8509) by @Copilot
- consolidate top_level_var test cases using configVariants (#8508) by @IWANABETHATGUY
- add s390x and ppc64le linux gnu targets (#8493) by @Brooooooklyn

### ◀️ Revert

- fix(rolldown): increase tokio blocking threads size for watch mode (#8517) by @hyf0

### ❤️ New Contributors

* @minsoo-web made their first contribution in [#8536](#8536)
* @crusty-voidzero made their first contribution in [#8495](#8495)
* @maciekzygmunt made their first contribution in [#8486](#8486)

Co-authored-by: shulaoda <165626830+shulaoda@users.noreply.github.com>
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.

3 participants