Skip to content

Conversation

@hyf0
Copy link
Member

@hyf0 hyf0 commented Sep 17, 2025

No description provided.

@hyf0 hyf0 marked this pull request as ready for review September 17, 2025 13:31
Copy link
Member Author

hyf0 commented Sep 17, 2025


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.

@graphite-app graphite-app bot changed the base branch from 09-17-feat_dev_merge_mergeable_queued_tasks_into_one to graphite-base/6262 September 17, 2025 13:32
@hyf0 hyf0 force-pushed the 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_ branch from e6bfb5a to 46ab573 Compare September 17, 2025 13:34
@hyf0 hyf0 force-pushed the graphite-base/6262 branch from 9d69615 to 360d733 Compare September 17, 2025 13:34
@hyf0 hyf0 changed the base branch from graphite-base/6262 to 09-17-feat_dev_merge_mergeable_queued_tasks_into_one September 17, 2025 13:34
Base automatically changed from 09-17-feat_dev_merge_mergeable_queued_tasks_into_one to main September 17, 2025 13:41
@hyf0 hyf0 requested a review from sapphi-red September 17, 2025 14:21
@hyf0 hyf0 force-pushed the 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_ branch from 46ab573 to c79e790 Compare September 17, 2025 17:06
@netlify
Copy link

netlify bot commented Sep 17, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 896e371
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68cbb8ab69147b00083cf6aa
😎 Deploy Preview https://deploy-preview-6262--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.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 17, 2025

Benchmarks Rust

  • target: main(9c93a52)
  • pr: 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_(896e371)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     79.5±1.71ms        ? ?/sec    1.09     86.9±3.22ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     90.3±1.91ms        ? ?/sec    1.05     94.3±2.73ms        ? ?/sec
bundle/bundle@rome_ts                                        1.00    119.9±3.68ms        ? ?/sec    1.01    121.7±2.92ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    140.2±2.85ms        ? ?/sec    1.03    144.3±2.25ms        ? ?/sec
bundle/bundle@threejs                                        1.02     45.7±2.78ms        ? ?/sec    1.00     44.6±0.93ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.00     53.8±0.79ms        ? ?/sec    1.01     54.4±0.95ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    472.2±5.82ms        ? ?/sec    1.00    469.9±5.96ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.00    551.4±3.93ms        ? ?/sec    1.00    550.8±6.18ms        ? ?/sec
scan/scan@rome_ts                                            1.03     97.3±2.56ms        ? ?/sec    1.00     94.7±2.54ms        ? ?/sec
scan/scan@threejs                                            1.00     33.6±0.53ms        ? ?/sec    1.01     33.9±2.14ms        ? ?/sec
scan/scan@threejs10x                                         1.01    354.9±3.75ms        ? ?/sec    1.00    351.0±3.94ms        ? ?/sec

@sapphi-red
Copy link
Member

sapphi-red commented Sep 18, 2025

With this PR, the new file is now output in #6260. But the output seems wrong. It contains the old src/main.js. The output:

// ...

//#region src/foo.js
var foo_exports = /* @__PURE__ */ __export({ value: () => value });
const foo_hot = __rolldown_runtime__.createModuleHotContext("src/foo.js");
__rolldown_runtime__.registerModule("src/foo.js", { exports: foo_exports });
let value = "edited-foo";
foo_hot.accept();
nodeFs.writeFileSync("./ok-0", "");

//#endregion
//#region src/main.js
var main_exports = {};
const main_hot = __rolldown_runtime__.createModuleHotContext("src/main.js");
__rolldown_runtime__.registerModule("src/main.js", { exports: main_exports });
assert.strictEqual(value, "foo");

//#endregion
export {  };

@hyf0 hyf0 force-pushed the 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_ branch 2 times, most recently from 883486f to 0330d9b Compare September 18, 2025 06:52
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@graphite-app
Copy link
Contributor

graphite-app bot commented Sep 18, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_ branch from 0330d9b to 896e371 Compare September 18, 2025 07:45
@graphite-app graphite-app bot merged commit 896e371 into main Sep 18, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 09-17-fix_dev_ensure_latest_build_output_should_work_correctly_when_eagerbuild_false_ branch September 18, 2025 07:54
shulaoda pushed a commit that referenced this pull request Sep 22, 2025
## [1.0.0-beta.39] - 2025-09-22

⚡ MacOS Performance Boost

- 10%-30% faster bundling
- Up to 45% in extreme cases

### 🚀 Features

- rolldown: oxc v0.90.0 + other oxc crate updates (#6274) by @Boshen
- support ignoring `/* @vite-ignore */` comment for dynamic imports (#6264) by @IWANABETHATGUY
- dev: merge mergeable queued tasks into one (#6253) by @hyf0
- dev: ignore self imports when computing update for invalidate (#6252) by @sapphi-red
- support `#__NO_SIDE_EFFECTS__` annotation for export default function declaration (#6239) by @IWANABETHATGUY
- rolldown_plugin_dynamic_import_vars: respect `@vite-ignore` comment (#6240) by @shulaoda
- rolldown_plugin_import_glob: support `exhaustive` option (#6236) by @shulaoda
- cross chunk /* @__NO_SIDE_EFFECTS__ */ support (#6207) by @IWANABETHATGUY
- rolldown_plugin_react_refresh_wrapper: make the plugin callable (#6229) by @sapphi-red

### 🐛 Bug Fixes

- handle optional chaining in scope hoisting member expression rewriting (#6278) by @shulaoda
- release: Fix semver commit release format to use plus instead of dash (#6273) by @Copilot
- dev: `ensure_latest_build_output` should work correctly when `eagerBuild: false` (#6262) by @hyf0
- browser: does not work in stackblitz (#6257) by @shulaoda
- only inline constants that are not reassigned (#6247) by @IWANABETHATGUY
- handle lexical declarations in root scope (#6230) by @IWANABETHATGUY

### 🚜 Refactor

- move oxc runtime helper generation from `build.rs` to task generator (#6284) by @shulaoda
- remove unused `SpanExt` (#6266) by @IWANABETHATGUY
- remove `@rolldown-ignore` ignore comment support (#6265) by @IWANABETHATGUY
- enhance CommonJsAstType to track property names (#6250) by @IWANABETHATGUY
- simplify usage for `Address::from` (#6245) by @IWANABETHATGUY
- remove `stmt_info_idx` in StmtInfo (#6244) by @IWANABETHATGUY
- extract `CrossModuleOptimizationRunnerContext` in cross_module_optimization (#6243) by @IWANABETHATGUY
- dev: task-queue based deisgn (#6233) by @hyf0
- extract immutable context from AstScanner (#6238) by @IWANABETHATGUY
- dev: rename `WatcherEventService` to `BuildDriverService` (#6232) by @hyf0
- move FlatOptions to rolldown_common (#6235) by @IWANABETHATGUY
- extract mutable state from ScopeHoistingFinalizerContext (#6234) by @IWANABETHATGUY
- wait `this.load` using futures instead of callbacks (#6222) by @sapphi-red
- rolldown_plugin_transform: remove unused `runtime_resolve_base` option (#6226) by @sapphi-red

### 📚 Documentation

- add "edit this page on GitHub" button (#6241) by @siaeyy

### ⚡ Performance

- rolldown: minor performance optimization (#6271) by @Brooooooklyn
- rolldown: take advantage of tokio blocking threads (#6270) by @Brooooooklyn

### 🧪 Testing

- dev: add rebuild after HMR case (#6260) by @sapphi-red
- dev: support full reload in tests (#6259) by @sapphi-red
- dev: extract waitFor from waitForPathExists (#6261) by @sapphi-red
- add class like cases for empty function optimizations (#6248) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- deps: update github-actions (#6298) by @renovate[bot]
- deps: update dependency dprint/dprint-plugin-typescript to v0.95.11 (#6296) by @renovate[bot]
- deps: update dependency dprint/dprint-plugin-markdown to v0.19.0 (#6295) by @renovate[bot]
- deps: update dependency g-plane/pretty_yaml to v0.5.1 (#6294) by @renovate[bot]
- use a forked version of openharmony-rs/setup-ohos-sdk (#6290) by @Boshen
- deps: update dependency tsdown to v0.15.4 (#6286) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.16.7 (#6285) by @renovate[bot]
- rust: continue to make `cargo publish --workspace` work (#6281) by @Boshen
- deps: update dependency tsdown to v0.15.3 (#6280) by @renovate[bot]
- rust: fixes for `cargo publish --dry-run --workspace` (#6279) by @Boshen
- deps: update dependency rust to v1.90.0 (#6277) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.16.6 (#6276) by @renovate[bot]
- adding tracing for all sub stage in LinkStage:link (#6268) by @IWANABETHATGUY
- deps: update oxc-project/setup-node action to v1.0.4 (#6258) by @renovate[bot]
- deps: update github-actions (#6249) by @renovate[bot]
- deps: update dependency tsdown to v0.15.2 (#6242) by @renovate[bot]
- dev: output error when the initial bundle failed (#6228) by @sapphi-red

### ❤️ New Contributors

* @siaeyy made their first contribution in [#6241](#6241)
graphite-app bot pushed a commit that referenced this pull request Sep 24, 2025
…` 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.
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