refactor(rust/watch): tweak struct/function names#8464
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 1, 2026
Merged
refactor(rust/watch): tweak struct/function names#8464graphite-app[bot] merged 1 commit intomainfrom
graphite-app[bot] merged 1 commit intomainfrom
Conversation
This was referenced Feb 25, 2026
Member
Author
hyf0
commented
Feb 25, 2026
Contributor
Benchmarks Rust |
21d9c5b to
a9713cd
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR performs a refactoring of the rolldown_watcher crate to improve naming clarity and code organization. The changes rename and reorganize struct names, function names, and file names to better reflect their purpose in the watch mode implementation.
Changes:
- Renamed
ChangeEntrytoFileChangeEventand moved it to a dedicated file with a type change fromArcStrtoStringfor the path field - Renamed
WatcherMsg::FsEventtoWatcherMsg::FileChangesand moved message types towatcher_msg.rs - Moved
WatcherStatefromstate.rstowatcher_state.rsfor consistency - Extracted
TaskFsEventHandlerfromwatcher.rsto its own filetask_fs_event_handler.rswith simplified event mapping logic - Renamed method
invalidate()tomark_needs_rebuild()for clarity - Renamed method
process_fs_event()toprocess_file_changes()to reflect its actual purpose - Updated extensive documentation in
meta/design/watch-mode.mdand added newmeta/design/module-id.mddesign document
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
meta/design/watch-mode.md |
Updated architecture diagrams, file structure listings, and detailed debouncing explanation to reflect refactored names |
meta/design/module-id.md |
New design document describing module ID handling, path identity, and normalization across the bundler |
crates/rolldown_watcher/src/watcher_state.rs |
Renamed from state.rs; updated to use FileChangeEvent instead of ChangeEntry |
crates/rolldown_watcher/src/watcher_msg.rs |
New file containing WatcherMsg enum (moved from deleted msg.rs) with renamed FileChanges variant |
crates/rolldown_watcher/src/watcher.rs |
Removed inline TaskFsEventHandler struct and updated imports |
crates/rolldown_watcher/src/watch_task.rs |
Renamed invalidate() method to mark_needs_rebuild() for clarity |
crates/rolldown_watcher/src/watch_coordinator.rs |
Renamed process_fs_event() to process_file_changes() and simplified to accept pre-mapped events |
crates/rolldown_watcher/src/task_fs_event_handler.rs |
New file containing extracted and refactored TaskFsEventHandler with simplified event mapping |
crates/rolldown_watcher/src/msg.rs |
Deleted; contents moved to watcher_msg.rs |
crates/rolldown_watcher/src/lib.rs |
Updated module declarations and public exports to reflect new file structure |
crates/rolldown_watcher/src/file_change_event.rs |
New file containing FileChangeEvent struct (renamed from ChangeEntry) with String path field |
76864d5 to
8dde365
Compare
8dde365 to
b14dd3b
Compare
a9713cd to
fe06c42
Compare
sapphi-red
reviewed
Feb 26, 2026
fe06c42 to
cd11c19
Compare
b14dd3b to
061a9b3
Compare
cd11c19 to
4ef73e1
Compare
✅ Deploy Preview for rolldown-rs canceled.
|
4ef73e1 to
d9b1ab3
Compare
3 tasks
shulaoda
approved these changes
Feb 28, 2026
IWANABETHATGUY
approved these changes
Mar 1, 2026
d9b1ab3 to
850f783
Compare
Member
Author
Merge activity
|
850f783 to
f62ae0f
Compare
This was referenced Mar 1, 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>
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.

No description provided.