Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Sep 24, 2025

The following scenario was not working.

  1. Edit file
  2. HMR happens
  3. Reload the window (stale content was shown!)

It is because the fix for ensure_latest_build_output in #6262 wasn't applied to scheduleBuildIfStale. To achieve that properly, it requires a significant refactor as scheduleBuildIfStale returns a future of the build process. For now, I added hasLatestBuildOutput instead to achieve a similar behavior. This approach has a problem of race condition because the internal state mutex is released in between the hasLatestBuildOutput call and the ensureLatestBuildOutput call. But this should be good enough for the initial implementation.

Copy link
Member Author


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 Sep 24, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 1d3b957
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68d406b2bfe2ef000995c13c
😎 Deploy Preview https://deploy-preview-6321--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sapphi-red sapphi-red requested a review from hyf0 September 24, 2025 05:59
@sapphi-red sapphi-red marked this pull request as ready for review September 24, 2025 05:59
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Sep 24, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Sep 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Sep 24, 2025

Benchmarks Rust

  • target: main(d13f8e9)
  • pr: 09-24-fix_dev_add_haslatestbuildoutput_instead_of_schedulebuildifstale_and_add_edit-reload_test(1d3b957)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     64.3±1.16ms        ? ?/sec    1.07     68.5±4.43ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     71.4±1.90ms        ? ?/sec    1.01     72.0±1.12ms        ? ?/sec
bundle/bundle@rome_ts                                        1.02    109.7±2.50ms        ? ?/sec    1.00    108.0±1.63ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    124.9±1.82ms        ? ?/sec    1.00    124.9±1.81ms        ? ?/sec
bundle/bundle@threejs                                        1.01     43.4±1.18ms        ? ?/sec    1.00     43.1±2.47ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.02     50.0±0.91ms        ? ?/sec    1.00     49.2±0.46ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    419.5±3.73ms        ? ?/sec    1.01    423.2±6.07ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    482.5±3.84ms        ? ?/sec    1.00    483.2±4.32ms        ? ?/sec
scan/scan@rome_ts                                            1.01     85.7±1.57ms        ? ?/sec    1.00     84.7±1.47ms        ? ?/sec
scan/scan@threejs                                            1.01     32.2±1.84ms        ? ?/sec    1.00     31.9±1.96ms        ? ?/sec
scan/scan@threejs10x                                         1.02    329.1±4.29ms        ? ?/sec    1.00    321.7±3.06ms        ? ?/sec

@hyf0
Copy link
Member

hyf0 commented Sep 24, 2025

Good one. I plan to finish #6297 today. It's a big change. I want to delay this before we merge it, so we could see if there's any conflict we need to solve. I could solve conflicts, just want to check how they interacts.

@hyf0 hyf0 force-pushed the 09-24-fix_dev_add_haslatestbuildoutput_instead_of_schedulebuildifstale_and_add_edit-reload_test branch from a1a01a6 to 22e13da Compare September 24, 2025 14:13
Copy link
Member

hyf0 commented Sep 24, 2025

Merge activity

…` and add edit-reload test (#6321)

The following scenario was not working.

1. Edit file
2. HMR happens
3. Reload the window (stale content was shown!)

It is because the fix for `ensure_latest_build_output` in #6262 wasn't applied to `scheduleBuildIfStale`. To achieve that properly, it requires a significant refactor as `scheduleBuildIfStale` returns a future of the build process. For now, I added `hasLatestBuildOutput` instead to achieve a similar behavior. This approach has a problem of race condition because the internal state mutex is released in between the `hasLatestBuildOutput` call and the `ensureLatestBuildOutput` call. But this should be good enough for the initial implementation.
@graphite-app graphite-app bot force-pushed the 09-24-fix_dev_add_haslatestbuildoutput_instead_of_schedulebuildifstale_and_add_edit-reload_test branch from 22e13da to 1d3b957 Compare September 24, 2025 14:56
@graphite-app graphite-app bot merged commit 1d3b957 into main Sep 24, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 09-24-fix_dev_add_haslatestbuildoutput_instead_of_schedulebuildifstale_and_add_edit-reload_test branch September 24, 2025 15:09
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Sep 25, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Sep 29, 2025
shulaoda added a commit that referenced this pull request Sep 30, 2025
## [1.0.0-beta.41] - 2025-09-29

### 🚀 Features

- support `output.generatedCode.symbols` (#6335) by @IWANABETHATGUY
- rolldown: oxc v0.93.0 (#6364) by @Boshen
- rolldown_plugin_vite_html: finish script tag logic (#6355) by @shulaoda
- rolldown_plugin_vite_html: support inline html proxy (#6353) by @shulaoda
- rolldown_plugin_vite_html: transform script tag into js import (#6351) by @shulaoda
- rolldown_plugin_vite_html: overwrite script src url (#6349) by @shulaoda
- rolldown_plugin_vite_html: remove `vite-ignore` attribute (#6348) by @shulaoda
- rolldown_plugin_vite_html: use `html5ever` and `markup5ever_rcdom` (#6327) by @shulaoda
- rust/dev: support `on_output` callback (#6330) by @hyf0
- rust/dev: support `disable_watcher` (#6329) by @hyf0
- dev: introduce client/session concept into dev engine (#6297) by @hyf0

### 🐛 Bug Fixes

- 'asset' module type and CJS format produces warnings and wrong output (#6369) by @IWANABETHATGUY
- inlining constants in CJS by optimization.inlineConst incorrectly inlines non-constant values if the value is assigned more than once (#6328) by @IWANABETHATGUY
- dev: add `hasLatestBuildOutput` instead of `scheduleBuildIfStale` and add edit-reload test (#6321) by @sapphi-red

### 🚜 Refactor

- rust/dev: rename `HmrManager` to `HmrState` and tweak namings (#6358) by @hyf0
- rust/dev: use `Bundler` to expose hmr related methods (#6356) by @hyf0
- rolldown_plugin_vite_html: use `html5gum` instead (#6343) by @shulaoda
- dev: remove deprecated `new` field from HMR options and related configurations (#6337) by @hyf0
- dev: remove unused hmr API (#6336) by @hyf0
- make `cjs_ast_analyzer` immutable for better reuse (#6326) by @IWANABETHATGUY
- simplify logic for determining entry is_lived (#6325) by @IWANABETHATGUY

### ⚡ Performance

- dev: compute depended data incrementally (#6357) by @hyf0

### 🧪 Testing

- rust/hmr: use dev engine to test hmr (#6334) by @hyf0

### ⚙️ Miscellaneous Tasks

- deps: update notify (#6368) by @sapphi-red
- deps: lock file maintenance npm packages (#6366) by @renovate[bot]
- deps: update github-actions (#6365) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.16.9 (#6354) by @renovate[bot]
- deps: update dependency tsdown to v0.15.5 (#6350) by @renovate[bot]
- node: use `catalog:` to unify version of all dependencies (#6339) by @hyf0
- ci: unify node installation via oxc-project/setup-node (#6338) by @Boshen
- deps: update crate-ci/typos action to v1.36.3 (#6341) by @renovate[bot]
- remove unused snapshots (#6331) by @IWANABETHATGUY

Co-authored-by: shulaoda <[email protected]>
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Sep 30, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Oct 15, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Oct 21, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Oct 28, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Nov 17, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Nov 19, 2025
sapphi-red added a commit to vitejs/rolldown-vite that referenced this pull request Dec 4, 2025
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