-
Notifications
You must be signed in to change notification settings - Fork 678
fix(dev): add hasLatestBuildOutput instead of scheduleBuildIfStale and add edit-reload test
#6321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
How to use the Graphite Merge QueueAdd 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. |
✅ Deploy Preview for rolldown-rs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Benchmarks Rust
|
|
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. |
a1a01a6 to
22e13da
Compare
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.
22e13da to
1d3b957
Compare
## [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]>

The following scenario was not working.
It is because the fix for
ensure_latest_build_outputin #6262 wasn't applied toscheduleBuildIfStale. To achieve that properly, it requires a significant refactor asscheduleBuildIfStalereturns a future of the build process. For now, I addedhasLatestBuildOutputinstead to achieve a similar behavior. This approach has a problem of race condition because the internal state mutex is released in between thehasLatestBuildOutputcall and theensureLatestBuildOutputcall. But this should be good enough for the initial implementation.