Skip to content

refactor(watch): remove auto watch for fail imports#8585

Merged
graphite-app[bot] merged 1 commit intomainfrom
03-08-refactor_watch_remove_auto_watch_for_fail_imports
Mar 8, 2026
Merged

refactor(watch): remove auto watch for fail imports#8585
graphite-app[bot] merged 1 commit intomainfrom
03-08-refactor_watch_remove_auto_watch_for_fail_imports

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Mar 8, 2026

Partially reverts #8562 but still keeps the fix for #8560

Copy link
Member Author

hyf0 commented Mar 8, 2026


How to use the Graphite Merge Queue

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

@socket-security
Copy link

socket-security bot commented Mar 8, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpeggy@​5.0.6991009687100
Addedoxc-walker@​0.5.210010010088100
Addedlint-staged@​16.2.79910010088100
Addedoxfmt@​0.35.0901008996100
Addedoxlint@​1.50.0991009196100
Addedoxc-minify@​0.115.0981009496100
Addedoxc-transform@​0.115.0941009696100
Addedmocha@​11.7.5971009596100
Addedoxc-parser@​0.115.09510010096100
Addedoxlint-tsgolint@​0.15.01001009796100

View full report

@socket-security
Copy link

socket-security bot commented Mar 8, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm markdown-it is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: pnpm-lock.yamlnpm/markdown-it@14.1.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/markdown-it@14.1.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@netlify
Copy link

netlify bot commented Mar 8, 2026

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit 5622d0f
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/69ad1509520ec100097d70a1

@hyf0 hyf0 marked this pull request as ready for review March 8, 2026 05:49
Copilot AI review requested due to automatic review settings March 8, 2026 05:49
@hyf0 hyf0 marked this pull request as draft March 8, 2026 05:50
@hyf0 hyf0 marked this pull request as ready for review March 8, 2026 05:50
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 refactors rolldown’s watch mode to stop auto-rebuilding when previously-missing imports appear on disk, aligning behavior with Rollup’s “only watch successfully loaded modules” approach.

Changes:

  • Removes “missing import directory” tracking and rebuild-on-create behavior from the Rust watcher/plugin pipeline.
  • Updates watch-mode design docs and the relevant watch tests to reflect the new recovery workflow (create missing file, then touch a watched file).
  • Adds a new examples/watch workspace project for watch-mode usage.

Reviewed changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-lock.yaml Adds examples/watch as a workspace importer dependency on rolldown.
packages/rolldown/tests/watch/watch.test.ts Adjusts tests to trigger rebuild via touching an already-watched file after fixing missing imports.
meta/design/watch-mode.md Updates design documentation to describe manual recovery instead of auto-watching missing import directories.
examples/watch/rolldown.config.js Adds a watch-mode example config using defineConfig.
examples/watch/package.json Adds the watch example workspace package definition.
examples/watch/index.ts Adds example entrypoint (currently logs hello() result).
examples/watch/hello.ts Adds example module for the watch demo.
crates/rolldown_watcher/src/watch_task.rs Removes missing-import directory watching and simplifies rebuild invalidation to watched files only.
crates/rolldown_watcher/src/watch_coordinator.rs Updates coordinator to call the new mark_needs_rebuild(&path) signature.
crates/rolldown_plugin/src/plugin_driver/plugin_driver_factory.rs Removes initialization of missing_import_dirs from PluginDriver.
crates/rolldown_plugin/src/plugin_driver/mod.rs Removes missing_import_dirs storage and its lifecycle clearing.
crates/rolldown/src/module_loader/resolve_utils.rs Removes missing-import tracking during resolution failures.
crates/rolldown/src/bundle/bundle.rs Removes get_missing_import_dirs() API from Bundle.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

Benchmarks Rust

  • target: main(19b8db0)
  • pr: 03-08-refactor_watch_remove_auto_watch_for_fail_imports(4bc4a11)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.09     89.7±2.42ms        ? ?/sec    1.00     82.7±1.42ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.05     98.0±3.07ms        ? ?/sec    1.00     93.0±2.28ms        ? ?/sec
bundle/bundle@rome_ts                                        1.04    187.2±3.72ms        ? ?/sec    1.00    179.5±5.33ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.04    204.6±2.85ms        ? ?/sec    1.00    196.1±4.15ms        ? ?/sec
bundle/bundle@threejs                                        1.04     83.5±3.01ms        ? ?/sec    1.00     80.5±3.77ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.11     92.8±2.47ms        ? ?/sec    1.00     83.6±2.18ms        ? ?/sec
bundle/bundle@threejs10x                                     1.02    811.0±8.33ms        ? ?/sec    1.00    792.0±6.68ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.03    922.8±9.90ms        ? ?/sec    1.00    896.6±9.08ms        ? ?/sec
scan/scan@rome_ts                                            1.00     79.8±1.54ms        ? ?/sec    1.00     79.4±1.54ms        ? ?/sec
scan/scan@threejs                                            1.01     28.0±0.39ms        ? ?/sec    1.00     27.8±0.46ms        ? ?/sec
scan/scan@threejs10x                                         1.01    274.8±4.25ms        ? ?/sec    1.00    272.0±3.74ms        ? ?/sec

Copy link
Member Author

hyf0 commented Mar 8, 2026

Merge activity

Partially reverts #8562 but still keeps the fix for #8560
@graphite-app graphite-app bot force-pushed the 03-08-refactor_watch_remove_auto_watch_for_fail_imports branch from 4bc4a11 to 5622d0f Compare March 8, 2026 06:19
@graphite-app graphite-app bot merged commit 5622d0f into main Mar 8, 2026
34 checks passed
@graphite-app graphite-app bot deleted the 03-08-refactor_watch_remove_auto_watch_for_fail_imports branch March 8, 2026 06:26
@github-actions github-actions bot mentioned this pull request Mar 9, 2026
shulaoda added a commit that referenced this pull request Mar 9, 2026
## [1.0.0-rc.8] - 2026-03-09

### 🚀 Features

- watch: enable full functional fs watcher in wasm (#8575) by @hyf0
- watch: expose debounce related options (#8572) by @hyf0

### 🐛 Bug Fixes

- detect new URL(…, import.meta.url) with no-sub template literal (#8565) by @char
- devtools: trace dynamic imports in devtools (#8581) by @cal-gooo
- watch: rebuild when a previously missing file is created (#8562) by @hyf0-agent
- watch: filter out Access events to prevent infinite rebuild loop on Linux (#8557) by @hyf0-agent

### 🚜 Refactor

- watch: remove auto watch for fail imports (#8585) by @hyf0
- fs_watcher: unify the way of constructing watcher (#8571) by @hyf0
- cli: migrate CLI to CAC (#8551) by @h-a-n-a
- switch asset module support from hard-code to builtin plugin (#8546) by @hyf0

### 📚 Documentation

- fix subject-verb agreement in why-bundlers.md (#8591) by @brandonzylstra
- maintenance: align release and canary workflow guide (#8538) by @minsoo-web
- add `format` option to directives example config (#8590) by @shulaoda
- fix: change twitter to x logo in team (#8552) by @mdong1909
- correct composable filter support explanation (#8550) by @sapphi-red

### ⚡ Performance

- testing: share tokio runtime across fixture tests (#8567) by @Boshen

### 🧪 Testing

- hmr: fix infinite loop in dev server test retry logic (#8576) by @hyf0-agent
- cli: add more cli-e2e test cases (#8548) by @h-a-n-a

### ⚙️ Miscellaneous Tasks

- docs: update in-depth/directives for `output.strict` option (#8535) by @minsoo-web
- add PNPM_HOME Dev Drive mapping to Windows CI workflows (#8589) by @Boshen
- deps: update github-actions (#8588) by @renovate[bot]
- move Windows cargo target dir to Dev Drive (#8586) by @Boshen
- optimize cache keys to fix race conditions and reduce usage (#8578) by @Boshen
- remove WASI build & test pipeline (#8580) by @Boshen
- remove unnecessary submodule checkouts (#8577) by @Boshen
- use Dev Drive for Windows CI jobs (#8574) by @Boshen
- skip redundant native binding build for browser and remove standalone job (#8573) by @Boshen
- parallelize Node tests on ubuntu, single Node 24 on macOS/windows (#8570) by @Boshen
- docs: bump @voidzero-dev/vitepress-theme to 4.8.0 (#8558) by @crusty-voidzero
- dedupe type-check from dev server workflow (#8554) by @Boshen

### ❤️ New Contributors

* @brandonzylstra made their first contribution in [#8591](#8591)
* @char made their first contribution in [#8565](#8565)
* @cal-gooo made their first contribution in [#8581](#8581)
* @hyf0-agent made their first contribution in [#8562](#8562)
* @h-a-n-a made their first contribution in [#8551](#8551)

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