Skip to content

Conversation

@sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Nov 20, 2025

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 Nov 20, 2025

Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 19e0e64
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/691ed16a7ff9220008e9b94f
😎 Deploy Preview https://deploy-preview-7145--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 November 20, 2025 07:06
@sapphi-red sapphi-red self-assigned this Nov 20, 2025
@sapphi-red sapphi-red marked this pull request as ready for review November 20, 2025 07:06
Copilot AI review requested due to automatic review settings November 20, 2025 07:06
@sapphi-red sapphi-red force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 6c57cfb to 6872d37 Compare November 20, 2025 07:08
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 replaces the hasLatestBuildOutput method with a more informative getBundleState method in the DevEngine API. The new method returns a struct containing both last_full_build_failed and has_stale_output fields, providing richer information about the bundle state to help consumers make better decisions about rebuild triggers.

Key changes:

  • Replaced boolean return from hasLatestBuildOutput() with structured BundleState object from getBundleState()
  • Added last_full_build_failed field to track build failure state across all layers
  • Updated coordinator to populate the new state field based on CoordinatorState::FullBuildFailed

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
packages/rolldown/src/binding.d.cts Updated TypeScript type definitions to reflect the new API signature and added BindingBundleState interface
packages/rolldown/src/api/dev/dev-engine.ts Renamed method and updated return type in the TypeScript API wrapper
crates/rolldown_dev/src/types/coordinator_state_snapshot.rs Added last_full_build_failed field to track build failure state
crates/rolldown_dev/src/lib.rs Exported the new BundleState struct from the public API
crates/rolldown_dev/src/dev_engine.rs Introduced BundleState struct with From implementation and renamed the method
crates/rolldown_dev/src/bundle_coordinator.rs Updated snapshot creation to include the new build failure state
crates/rolldown_binding/src/binding_dev_engine.rs Added binding layer conversion between BundleState and BindingBundleState

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sapphi-red sapphi-red force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 6872d37 to 9bd4cd3 Compare November 20, 2025 07:11
@github-actions
Copy link
Contributor

github-actions bot commented Nov 20, 2025

Benchmarks Rust

  • target: main(77ae7a4)
  • pr: 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_(19e0e64)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.00     67.9±2.12ms        ? ?/sec    1.00     67.7±1.75ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.00     74.8±2.81ms        ? ?/sec    1.00     74.8±1.64ms        ? ?/sec
bundle/bundle@rome_ts                                        1.02    111.8±4.09ms        ? ?/sec    1.00    109.3±1.89ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.00    124.0±3.94ms        ? ?/sec    1.00    123.5±2.27ms        ? ?/sec
bundle/bundle@threejs                                        1.00     40.2±0.82ms        ? ?/sec    1.00     40.3±2.08ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.01     44.3±1.00ms        ? ?/sec    1.00     43.9±1.08ms        ? ?/sec
bundle/bundle@threejs10x                                     1.00    398.9±5.02ms        ? ?/sec    1.00    397.2±6.74ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.01    460.9±5.93ms        ? ?/sec    1.00    457.7±5.60ms        ? ?/sec
scan/scan@rome_ts                                            1.01     88.1±1.81ms        ? ?/sec    1.00     87.1±1.81ms        ? ?/sec
scan/scan@threejs                                            1.03     29.8±1.99ms        ? ?/sec    1.00     28.9±0.49ms        ? ?/sec
scan/scan@threejs10x                                         1.01    299.3±4.37ms        ? ?/sec    1.00    295.1±4.17ms        ? ?/sec

@graphite-app
Copy link
Contributor

graphite-app bot commented Nov 20, 2025

Merge activity

graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 9bd4cd3 to 1254d13 Compare November 20, 2025 07:28
graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
Copilot AI review requested due to automatic review settings November 20, 2025 07:33
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 1254d13 to 8cf6ea8 Compare November 20, 2025 07:33
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 8cf6ea8 to 5bf0377 Compare November 20, 2025 07:35
graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
Copilot AI review requested due to automatic review settings November 20, 2025 07:37
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 5bf0377 to d884a7e Compare November 20, 2025 07:37
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
Copilot AI review requested due to automatic review settings November 20, 2025 07:39
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from d884a7e to 4d91496 Compare November 20, 2025 07:39
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 4d91496 to 0cd0025 Compare November 20, 2025 07:41
Copilot AI review requested due to automatic review settings November 20, 2025 08:03
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

graphite-app bot pushed a commit that referenced this pull request Nov 20, 2025
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from d8cea14 to 1f122db Compare November 20, 2025 08:27
Copilot AI review requested due to automatic review settings November 20, 2025 08:29
@graphite-app graphite-app bot force-pushed the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch from 1f122db to 19e0e64 Compare November 20, 2025 08:29
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@graphite-app graphite-app bot merged commit 19e0e64 into main Nov 20, 2025
28 checks passed
@graphite-app graphite-app bot deleted the 11-20-feat_dev_replace_devengine_haslatestbuildoutput_with_devengine_getbundlestate_ branch November 20, 2025 08:44
This was referenced Nov 26, 2025
shulaoda added a commit that referenced this pull request Nov 26, 2025
## [1.0.0-beta.52] - 2025-11-26

💥 Breaking Change

- Change `output.generatedCode.profilerNames` default to `false`

🔧 Vite-Style TypeScript Configuration

- Rolldown now supports Vite-style automatic tsconfig resolution. Use `tsconfig: true` to enable auto-discovery mode where each module finds its nearest `tsconfig.json`. See more details [here](https://rolldown.rs/options/tsconfig)

⚙️ Upgraded to oxc v0.99.0

- Add `TSGlobalDeclaration` type
- More details: https://github.com/oxc-project/oxc/releases/tag/crates_v0.99.0

### 💥 BREAKING CHANGES

- change `output.generatedCode.profilerNames` default to false (#7139) by @Copilot

### 🚀 Features

- support vite-style tsconfig resolution (#6873) by @shulaoda
- rolldown: oxc v0.99.0  (#7165) by @camc314
- browser: export `plugins` (#7210) by @sxzz
- rolldown_plugin_vite_css_post: add `inline` parameter to `cssMinify` callback (#7191) by @shulaoda
- rolldown_plugin_vite_build_import_analysis: implement `render_chunk` to replace `__VITE_IS_MODERN__` flag (#7178) by @shulaoda
- rolldown_plugin_utils: optimize SVG data URL encoding (#7156) by @shulaoda
- dev: replace `DevEngine::hasLatestBuildOutput` with `DevEngine::getBundleState` (#7145) by @sapphi-red
- rolldown_plugin_vite_asset_import_meta_url: support `@vite-ignore` comment (#7141) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: implement static URL processing (#7140) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: align `asset_resolver` logic (#7137) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: align `try_fs_resolve` logic (#7136) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: validate relative paths (#7120) by @shulaoda
- export `viteAssetImportMetaUrlPlugin` and add dynamic URL tests (#7119) by @shulaoda

### 🐛 Bug Fixes

- watch overwrite rename event on linux (#7201) by @sapphi-red
- preserve name for parenthesized anonymous default exports and arrow functions with keepNames (#7159) by @Copilot
- rolldown_plugin_vite_html: add missing async attribute for inlined entry scripts (#7202) by @shulaoda
- respect target setting in DCE to prevent modern syntax generation (#7128) by @Copilot
- rolldown_plugin_vite_html: add semicolon to import statement in CSS removal (#7200) by @shulaoda
- rolldown_plugin_vite_html: use correct CSS asset filename in HTML injection (#7199) by @shulaoda
- rolldown_plugin_vite_css_post: handle scoped package names in lib CSS filename (#7198) by @shulaoda
- rolldown_plugin_vite_html: use patched `html5gum` with correct span tracking (#7193) by @shulaoda
- rolldown_plugin_vite_html: handle HTML strings in script tags correctly (#7192) by @shulaoda
- handle JSON import namespace property access correctly (#7190) by @IWANABETHATGUY
- only include runtime helpers from included modules (#7183) by @IWANABETHATGUY
- rolldown_plugin_vite_html: normalize paths to use forward slashes in `original_file_name` (#7175) by @shulaoda
- rolldown_plugin_vite_css_post: use `filename` instead of `reference_id` for imported assets (#7174) by @shulaoda
- rolldown_plugin_vite_css_post: correct regex escaping in pure CSS chunk pruning (#7173) by @shulaoda
- rolldown_plugin_vite_html: use correct dependency path for modulepreload links (#7172) by @shulaoda
- update cur_stmt_index when processing top level statements (#7157) by @IWANABETHATGUY
- rolldown_plugin_utils: strip leading character from public asset URL (#7170) by @shulaoda
- rolldown_plugin_vite_html: use correct `public_base` for `html_result_map` key (#7169) by @shulaoda
- rolldown_plugin_utils: correct runtime handling and escape single quotes in asset paths (#7168) by @shulaoda
- rolldown_plugin_utils: prevent data race in `file_to_url` cache (#7166) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: correct glob pattern and query string handling in dynamic URLs (#7162) by @shulaoda
- rolldown_plugin_vite_css_post: use correct start position in magic string updates (#7158) by @shulaoda
- data race in `FileEmitter::emit_file` causing duplicate asset emissions (#7164) by @shulaoda
- dev: watch files even if the build failed (#7149) by @sapphi-red
- rolldown_plugin_utils: always use base64 encoding for data URLs (#7148) by @shulaoda
- preserve "default" name for anonymous default exports with keepNames (#7151) by @Copilot
- correctly handle cjs json module as entry point (#7147) by @IWANABETHATGUY
- rolldown_plugin_utils: correct `reference_id` parsing in `render_asset_url_in_js` (#7143) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: exclude quotes from URL span (#7142) by @shulaoda
- rolldown_plugin_vite_asset_import_meta_url: use template literal for glob result indexing (#7134) by @shulaoda
- tree shake unused dynamic entry when `inlineDynamicImports` is enabled (#7129) by @IWANABETHATGUY
- correct return value of `parse` / `parseSync` functions (#7127) by @sapphi-red

### 🚜 Refactor

- rolldown_plugin_vite_transform: use `oxc_resolver` for tsconfig discovery (#7220) by @shulaoda
- rolldown_plugin_vite_resolve: use `resolve_file` for tsconfig discovery (#7216) by @shulaoda
- rolldown_plugin_utils: remove redundant `ViteMetadata::get_or_insert_default()` (#7189) by @shulaoda
- rolldown_plugin_utils: simplify `ViteMetadata::get()` to always return a value (#7188) by @shulaoda
- rolldown_utils: add `guess_mime_skip_utf8_check` for binary assets (#7161) by @shulaoda
- rolldown_plugin_utils: extract asset URL parsing into `AssetUrlIter` (#7144) by @shulaoda
- store pattern name in FilenameTemplate (#7132) by @IWANABETHATGUY

### 📚 Documentation

- tsconfig: document auto-discovery mode and improve structure (#7228) by @shulaoda
- add plugin hook filter compatibility and fallback guide (#7138) by @Copilot
- update top level navigation (#7092) by @mdong1909

### 🧪 Testing

- add tsconfig include/exclude/files matching test cases (#6899) by @shulaoda
- vite-tests: run `playwright install` in case playwright binary is missing (#7226) by @sapphi-red
- watch: close watcher when an error occured in the test cases (#7225) by @sapphi-red
- watch: reject `waitBuildFinished` if `ERROR` event occurs (#7224) by @sapphi-red

### ⚙️ Miscellaneous Tasks

- example: revert accidental changes to basic-typescript (#7227) by @shulaoda
- deps: update oxc apps (#7212) by @renovate[bot]
- deps: update rust crates (#7204) by @renovate[bot]
- deps: update `oxc_resolver_napi` to 11.14.0 (#7217) by @shulaoda
- deps: update oxc_resolver (#6909) by @shulaoda
- deps: update dependency glob to v13 (#7208) by @renovate[bot]
- deps: update actions/checkout action to v6 (#7207) by @renovate[bot]
- deps: update npm packages (#7206) by @renovate[bot]
- deps: update github-actions (#7205) by @renovate[bot]
- add missing status code comment (#7185) by @iiio2
- deps: update dependency oxlint-tsgolint to v0.8.1 (#7197) by @renovate[bot]
- rust: add more tracing log for hmr + dev logic (#7179) by @hyf0
- deps: update dependency oxlint-tsgolint to v0.8.0 (#7167) by @renovate[bot]
- deps: update dependency oxlint-tsgolint to v0.7.3 (#7133) by @renovate[bot]
- merge similar inlineDynamicImports test case (#7131) by @IWANABETHATGUY
- deps: update `rolldown-plugin-dts` to 0.18.0 (#7125) by @shulaoda

Co-authored-by: shulaoda <[email protected]>
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