Skip to content

Comments

feat: implement synchronous JS callback invocation for paths function#6474

Merged
graphite-app[bot] merged 1 commit intomainfrom
10-10-feat_add_invoke_sync_for_jscallback_
Oct 10, 2025
Merged

feat: implement synchronous JS callback invocation for paths function#6474
graphite-app[bot] merged 1 commit intomainfrom
10-10-feat_add_invoke_sync_for_jscallback_

Conversation

@IWANABETHATGUY
Copy link
Member

@IWANABETHATGUY IWANABETHATGUY commented Oct 10, 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 Oct 10, 2025

Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit c96191f
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/68e9474088cf090008bc7b69

@github-actions
Copy link
Contributor

github-actions bot commented Oct 10, 2025

Benchmarks Rust

  • target: main(6d384df)
  • pr: 10-10-feat_add_invoke_sync_for_jscallback_(c96191f)
group                                                        pr                                     target
-----                                                        --                                     ------
bundle/bundle@multi-duplicated-top-level-symbol              1.08     73.4±2.69ms        ? ?/sec    1.00     68.1±1.81ms        ? ?/sec
bundle/bundle@multi-duplicated-top-level-symbol-sourcemap    1.07     78.9±1.94ms        ? ?/sec    1.00     73.8±2.00ms        ? ?/sec
bundle/bundle@rome_ts                                        1.02    116.9±4.25ms        ? ?/sec    1.00    114.0±3.01ms        ? ?/sec
bundle/bundle@rome_ts-sourcemap                              1.03    132.7±2.54ms        ? ?/sec    1.00    129.1±2.02ms        ? ?/sec
bundle/bundle@threejs                                        1.06     46.1±1.09ms        ? ?/sec    1.00     43.7±2.31ms        ? ?/sec
bundle/bundle@threejs-sourcemap                              1.06     53.5±1.06ms        ? ?/sec    1.00     50.7±0.97ms        ? ?/sec
bundle/bundle@threejs10x                                     1.05   452.5±11.75ms        ? ?/sec    1.00    429.5±5.70ms        ? ?/sec
bundle/bundle@threejs10x-sourcemap                           1.02    505.3±6.79ms        ? ?/sec    1.00    496.9±8.52ms        ? ?/sec
scan/scan@rome_ts                                            1.00     86.7±1.35ms        ? ?/sec    1.01     87.8±2.34ms        ? ?/sec
scan/scan@threejs                                            1.00     32.8±2.05ms        ? ?/sec    1.01     33.3±2.38ms        ? ?/sec
scan/scan@threejs10x                                         1.00    337.1±4.99ms        ? ?/sec    1.00    336.8±5.31ms        ? ?/sec

@IWANABETHATGUY IWANABETHATGUY force-pushed the 10-10-feat_add_invoke_sync_for_jscallback_ branch from ef5e23f to 438cd71 Compare October 10, 2025 17:00
@IWANABETHATGUY IWANABETHATGUY marked this pull request as ready for review October 10, 2025 17:04
@IWANABETHATGUY IWANABETHATGUY changed the title feat: Add invoke_sync for JsCallback feat: implement synchronous JS callback invocation for paths function Oct 10, 2025
@IWANABETHATGUY IWANABETHATGUY force-pushed the 10-10-feat_add_invoke_sync_for_jscallback_ branch from f3fc74e to 02bbbbb Compare October 10, 2025 17:05
@IWANABETHATGUY IWANABETHATGUY requested a review from hyf0 October 10, 2025 17:06
Copy link
Member

@hyf0 hyf0 left a comment

Choose a reason for hiding this comment

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

Nicely done!

@graphite-app
Copy link
Contributor

graphite-app bot commented Oct 10, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the 10-10-feat_add_invoke_sync_for_jscallback_ branch from e464668 to c96191f Compare October 10, 2025 17:49
@graphite-app graphite-app bot merged commit c96191f into main Oct 10, 2025
29 checks passed
@graphite-app graphite-app bot deleted the 10-10-feat_add_invoke_sync_for_jscallback_ branch October 10, 2025 18:02
shulaoda pushed a commit that referenced this pull request Oct 13, 2025
## [1.0.0-beta.43] - 2025-10-13

### 🚀 Features

- add filterVitePlugins utility that uses to skip vite plugins using apply: "serve" (#6502) by @IWANABETHATGUY
- rolldown_plugin_vite_html: align partial can inline entry logic (#6500) by @shulaoda
- rolldown_plugin_vite_html: align get_imported_chunks logic (#6499) by @shulaoda
- rolldown_plugin_vite_html: align HtmlTagDescriptor (#6498) by @shulaoda
- rolldown_plugin_vite_html: align partial utility functions logic (#6497) by @shulaoda
- rolldown_html_vite_html: align partial inject chunk asset links logic (#6496) by @shulaoda
- rolldown_plugin_vite_html: align `processedHtml` logic (#6494) by @shulaoda
- add `nativeMagicString` options (#6469) by @IWANABETHATGUY
- rust: eagerly cleanup resources when calling `close` (#6483) by @hyf0
- rust: varify if bundler is closed for public API (#6481) by @hyf0
- replace [format] placeholder in chunk filename templates (#6476) by @elecmonkey
- implement synchronous JS callback invocation for paths function (#6474) by @IWANABETHATGUY
- rolldown_plugin_vite_html: align partial transform hook logic (#6471) by @shulaoda
- Support `output.paths` (#6470) by @IWANABETHATGUY
- rolldown_plugin_vite_html: align script urls handle logic (#6466) by @shulaoda
- add validation for `preserveEntrySignatures` with `includeDependenciesRecursively` option (#6468) by @hyf0
- rolldown_plugin_vite_html: align partial logic (#6465) by @shulaoda
- background sourcemap generation for Javascript transform hooks (#6293) by @IWANABETHATGUY
- rolldown_plugin_vite_html: handle style tag (#6464) by @shulaoda
- rolldown_plugin_vite_html: handle inline style attribute (#6463) by @shulaoda
- rolldown_plugin_vite_html: patially handle vite-ignore attribute (#6462) by @shulaoda
- dev/node: expose errors of `on_hmr_updatrs` to node (#6454) by @hyf0
- dev/node: expose errors of `on_output` to node (#6453) by @hyf0
- dev: expose hmr errors on `on_hmr_updatrs` callback (#6443) by @hyf0

### 🐛 Bug Fixes

- fallback sourcemap generation for `experimental.nativeMagicString: false` (#6488) by @IWANABETHATGUY
- take `resolve.modules` into account (#6484) by @Pickachu
- rolldown: increase tokio blocking threads size for watch mode (#6467) by @Brooooooklyn
- use len_utf16 in magic_string CharToByteMapper (#6461) by @IWANABETHATGUY
- pass `advancedChunks#includeDependenciesRecursively` to rust (#6448) by @hyf0
- dev: should compute hmr update correctly for multiple clients (#6442) by @hyf0
- allow specifying packageJsonPath in PluginContext.load (#6439) by @sapphi-red
- use transform.target as default for minify target when `minify: { compress: true }` (#6433) by @sapphi-red

### 🚜 Refactor

- extract background sourcemap handling into separate methods (#6501) by @IWANABETHATGUY
- rust: only expose methods of `Bundler` for public usage (#6480) by @hyf0
- dev/node: use napi object instead clss for `BindingClientHmrUpdate` (#6456) by @hyf0
- dev/node: improve `DevOnHmrUpdates` API (#6455) by @hyf0

### 📚 Documentation

- update team page and add acknowledgements page (#6495) by @hyf0
- restructure website and files (#6492) by @hyf0
- correct incorrect documentation about the config file (#6472) by @jsparkdev
- options: `experimental.strictExecutionOrder` (#6450) by @hyf0
- adding `why-plugin-hook-filter` in depth (#6446) by @IWANABETHATGUY

### ⚡ Performance

- rolldown: replace serde JSON string escape with simd impl (#6475) by @Brooooooklyn

### ⚙️ Miscellaneous Tasks

- docs: redirect removed path to new locations for compatibility (#6493) by @hyf0
- deps: lock file maintenance npm packages (#6490) by @renovate[bot]
- deps: update github-actions (major) (#6415) by @renovate[bot]
- deps: update github-actions (#6489) by @renovate[bot]
- rust: add comment for `DiagnosticOptions#stabilize_path` (#6447) by @hyf0
- rust: remove unused `BindingHmrOutput` (#6457) by @hyf0
- rolldown_plugin_vite_html: tweak `utils.rs` (#6460) by @shulaoda
- change node version to lts (#6435) by @iiio2
- rust/test: split hmr related structs into their own files (#6445) by @hyf0
- deps: update crate-ci/typos action to v1.38.1 (#6452) by @renovate[bot]
- rust/test: render hmr errors (#6444) by @hyf0
- examples: add `"type": "module"` in `package.json` (#6441) by @iiio2

### ❤️ New Contributors

* @Pickachu made their first contribution in [#6484](#6484)
* @elecmonkey made their first contribution in [#6476](#6476)
* @jsparkdev made their first contribution in [#6472](#6472)
IWANABETHATGUY added a commit that referenced this pull request Nov 11, 2025
Re-enables the previously skipped `fixture.test.ts >
output/paths/function` test by removing the `skip: true` flag.

## Changes Made

- **Test Re-enabled**: Removed `skip: true` from
`packages/rolldown/tests/fixtures/output/paths/function/_config.ts`
- **Dependency Reverted**: Kept tsdown at version 0.16.1 (did not
upgrade to 0.16.2 from main branch rebase)

## Background

The test was previously disabled due to flaky timeout issues (timing out
at 60 seconds). The test has been re-enabled without implementing a
timeout fix in the Rust code, as the timeout changes to
`crates/rolldown_binding/src/types/js_callback.rs` were reverted per
review feedback.

**Note**: The test may still be susceptible to the original flaky
timeout issue since no timeout protection was added to the `invoke_sync`
method's `cvar.wait()` call.

## Testing

- ✅ Build process completes successfully
- ✅ Test `output/paths/generate-bundle-imports-function` passes (similar
paths function test)

- Relates to #6737

<!-- START COPILOT CODING AGENT SUFFIX -->



<details>

<summary>Original prompt</summary>

> 
> ----
> 
> *This section details on the original issue you should resolve*
> 
> <issue_title>Flaky test `fixture.test.ts >
output/paths/function`</issue_title>
> <issue_description>Not sure why, but it keeps showing up recently
> 
> <img width="1846" height="666" alt="Image"
src="https://github.com/user-attachments/assets/2f4629bc-5f6d-4532-9ff3-82803f655e73"
/>
> 
>
https://github.com/rolldown/rolldown/runs/53880575830</issue_description>
> 
> ## Comments on the Issue (you are @copilot in this section)
> 
> <comments>
> <comment_new><author>@sapphi-red</author><body>
> I wonder if this is related to
#6474.
> `cvar.wait` is possibly hanging for some reason.</body></comment_new>
> <comment_new><author>@IWANABETHATGUY</author><body>
> > I wonder if this is related to
[#6474](#6474). `cvar.wait` is
possibly hanging for some reason.
> 
> Probably, but I never reproduce it locally.</body></comment_new>
> </comments>
> 


</details>

- Fixes #6737

<!-- START COPILOT CODING AGENT TIPS -->
---

✨ Let Copilot coding agent [set things up for
you](https://github.com/rolldown/rolldown/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot)
— coding agent works faster and does higher quality work when set up for
your repo.

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: IWANABETHATGUY <[email protected]>
Co-authored-by: IWANABETHATGUY <[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.

2 participants