Skip to content

perf(hmr): drop the unused kind argument from registerFactory - #10915

Merged
graphite-app[bot] merged 1 commit into
mainfrom
feat/hmr-register-factory-numeric-kind
Sep 18, 2026
Merged

graphite-app[bot] merged 1 commit into
mainfrom
feat/hmr-register-factory-numeric-kind

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Sep 18, 2026 •

Copy link
Copy Markdown
Member

In the new HMR runtime, both __rolldown_exports__ and __rolldown_module__ are moved to the body of the factory. So there's no need to specify module kind.

h-a-n-a commented Sep 18, 2026

Copy link
Copy Markdown
Member Author

How to use the Graphite Merge Queue

Add the label graphite: merge-when-ready 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.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-hmr-register-factory-numeric-kind-rolldown-rs.voidzero-docs.workers.dev (commit cd911a4)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b2fe86db-rolldown-rs.voidzero-docs.workers.dev cd911a4 2026-09-18T09:19:07.534Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://b49122a7-rolldown-rs.voidzero-docs.workers.dev d59b219 2026-09-18T08:20:52.425Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://cf8eb644-rolldown-rs.voidzero-docs.workers.dev debbc35 2026-09-18T08:15:06.827Z Visit the dashboard ↗
  • Build: In progress 🔵

View logs ↗
1e421ea 2026-09-18T08:12:12.058Z View logs ↗
  • Build: In progress 🔵

View logs ↗
16b1bb6 2026-09-18T08:11:44.003Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://66d056a3-rolldown-rs.voidzero-docs.workers.dev c2f7b00 2026-09-18T08:04:30.678Z Visit the dashboard ↗

@netlify

netlify Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs canceled.

Name Link
🔨 Latest commit cd911a4
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6aad0195671dc500081c842b

@h-a-n-a
h-a-n-a force-pushed the feat/hmr-register-factory-numeric-kind branch 2 times, most recently from 16b1bb6 to 1e421ea Compare September 18, 2026 08:12
@h-a-n-a h-a-n-a changed the title perf(hmr): use 0/1 for registerFactory module kind perf(hmr): drop the unused kind argument from registerFactory Sep 18, 2026
@h-a-n-a
h-a-n-a force-pushed the feat/hmr-register-factory-numeric-kind branch 2 times, most recently from debbc35 to d59b219 Compare September 18, 2026 08:18
@h-a-n-a
h-a-n-a marked this pull request as ready for review September 18, 2026 08:25

h-a-n-a commented Sep 18, 2026 •

Copy link
Copy Markdown
Member Author

Merge activity

  • Sep 18, 8:25 AM UTC: The merge label 'graphite: merge-when-ready' was detected. This PR will be added to the Graphite merge queue once it meets the requirements.
  • Sep 18, 9:16 AM UTC: h-a-n-a added this pull request to the Graphite merge queue.
  • Sep 18, 9:21 AM UTC: Merged by the Graphite merge queue.

@codspeed

codspeed Bot commented Sep 18, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing feat/hmr-register-factory-numeric-kind (d59b219) with main (a42049b)2

Open in CodSpeed

Footnotes

  1. 10 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

  2. No successful run was found on main (26e8418) during the generation of this report, so a42049b was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

<!--
- What is this PR solving? Write a clear and concise description.
- Reference the issues it solves (e.g. `fixes #123`).
- What other alternatives have you explored?
- Are there any parts you think require more attention from reviewers?

Also, please make sure you do the following:

- Read the Contributing Guidelines at https://rolldown.rs/contribution-guide/.
- Check that there isn't already a PR that solves the problem the same way. If you find a duplicate, please help us review it.
- Update the corresponding documentation if needed.
- Include relevant tests that fail without this PR but pass with it. If the tests are not included, explain why.

Thank you for contributing to Rolldown!
-->

In the new HMR runtime, both `__rolldown_exports__` and `__rolldown_module__` are moved to the body of the factory. So there's no need to specify module kind.
@graphite-app
graphite-app Bot force-pushed the feat/hmr-register-factory-numeric-kind branch from d59b219 to cd911a4 Compare September 18, 2026 09:17
@graphite-app
graphite-app Bot merged commit cd911a4 into main Sep 18, 2026
37 checks passed
@graphite-app
graphite-app Bot deleted the feat/hmr-register-factory-numeric-kind branch September 18, 2026 09:21
@rolldown-guard rolldown-guard Bot mentioned this pull request Sep 23, 2026
shulaoda added a commit that referenced this pull request Sep 23, 2026
## [1.2.10] - 2026-09-23

### 🚀 Features

- rolldown_plugin_esm_external_require: prefer 'module.exports' over a namespace spread (#10901) by @isker
- watch: support directories in addWatchFile (#10944) by @shulaoda
- label code-splitting timing rows (#10896) by @IWANABETHATGUY
- separate code-splitting group timing rows (#10892) by @IWANABETHATGUY
- clarify callback owners in the timing report (#10890) by @IWANABETHATGUY
- add checks.bundlerTimings with deprecated pluginTimings alias (#10883) by @IWANABETHATGUY

### 🐛 Bug Fixes

- code-splitting: initialize leaves behind a re-exported namespace import (#10694) by @hyfdev
- node: record the WASI target on the WebContainer binding fallback (#10952) by @shulaoda
- dev: force incremental build on in DevEngine::new (#10958) by @o-alexandrov
- tree-shaking: propagate side effects through cycles (#10893) by @IWANABETHATGUY
- deconflict CJS locals that shadow a renamed require wrapper (#10793) by @logaretm
- include group indexes in labeled `codeSplitting` timing rows (#10916) by @IWANABETHATGUY
- docs: type-check Algolia `indices` option (#10934) by @shulaoda
- docs: restore Algolia search (#10929) by @isker
- tell code-splitting timing rows apart by position (#10903) by @IWANABETHATGUY

### 🚜 Refactor

- rolldown_fs_watcher: remove the single-path API (#10950) by @shulaoda
- dev: register watch files through FsWatcher (#10949) by @shulaoda
- watch: let FsWatcher own the watched paths (#10948) by @shulaoda
- watch: identify watch files by normalized absolute path (#10943) by @shulaoda
- plugin: build a plugin-resolved `ResolvedId` in one place (#10921) by @IWANABETHATGUY

### 📚 Documentation

- dev: add HMR design, align dev docs and engine comments (#10271) by @h-a-n-a

### ⚡ Performance

- batch `sourcemapPathTransform` calls (#10763) by @IWANABETHATGUY
- batch `sourcemapIgnoreList` calls (#10762) by @IWANABETHATGUY
- hmr: drop the unused kind argument from registerFactory (#10915) by @h-a-n-a

### 🧪 Testing

- handle Windows paths in sourcemap callback tests (#10942) by @IWANABETHATGUY

### ⚙️ Miscellaneous Tasks

- replace custom `ban-expect-assertions` JS lint with builtin `no-restricted-properties` (#10933) by @isker
- deps: update napi (#10959) by @renovate[bot]
- deps: upgrade oxc to 0.151.0 (#10939) by @camc314
- deps: update test262 submodule for tests (#10941) by @rolldown-guard[bot]
- deps: update npm packages (#10931) by @renovate[bot]
- deps: update napi (#10928) by @renovate[bot]
- deps: update dependency vite-plus to v0.3.3 (#10914) by @renovate[bot]
- deps: update rust crates (#10932) by @renovate[bot]
- deps: update github actions (#10930) by @renovate[bot]
- deps: update dependency rolldown-plugin-dts to v0.28.6 (#10924) by @renovate[bot]
- deps: update crate-ci/typos action to v1.50.2 (#10917) by @renovate[bot]
- deps: update dependency @napi-rs/cli to v3.10.4 (#10913) by @renovate[bot]
- deps: update napi (#10897) by @renovate[bot]

### ❤️ New Contributors

* @o-alexandrov made their first contribution in [#10958](#10958)

Co-authored-by: shulaoda <[email protected]>
cursor Bot pushed a commit to sanity-io/plugins that referenced this pull request Sep 28, 2026
The sanity@next bump brings in [email protected], whose bundled-dev client inlines
rolldown 1.2.9's runtime while its `rolldown: ~1.2.9` range resolves 1.2.11.
rolldown 1.2.10 dropped the `kind` argument from registerFactory
(rolldown/rolldown#10915), so every lazy import in the test studio's
`sanity dev` failed with `factory.fn is not a function`.

Same override as #2034.
stipsan added a commit to sanity-io/plugins that referenced this pull request Sep 28, 2026
…2.9 (#2034)

<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
### Description

Ports
[sanity-io/sanity#15055](sanity-io/sanity#15055)
to this repo. `dev/test-studio` runs `sanity dev` with
`unstable_bundledDev: true`, so it has the same exposure.

Vite 8.3.1 inlines rolldown 1.2.9's browser dev runtime into
`bundledDevClient.mjs`, but declares `rolldown: ~1.2.9`. rolldown 1.2.10
dropped the `kind` argument from `registerFactory`
([rolldown#10915](rolldown/rolldown#10915)).
With rolldown 1.2.10 or 1.2.11 under Vite 8.3.1, every lazy `import()`
and HMR update in bundled dev fails with `TypeError: factory.fn is not a
function`.

This PR bumps Vite from 8.2.2 to 8.3.1 and adds a `[email protected]>rolldown:
1.2.9` override. The pin is scoped to 8.3.1 because the next Vite
release serves the runtime from the installed rolldown
([vite#23568](vitejs/vite#23568)). Delete it
when bumping past 8.3.1.

_Testing in progress; description will be updated with results._
<!-- CURSOR_AGENT_PR_BODY_END -->

<div><a
href="https://cursor.com/agents/bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb?cursor_ref=pr_footer&cursor_cta=open_in_web"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-8a49abed-56bd-47f4-9e16-fbcde27d80eb&cursor_ref=pr_footer&cursor_cta=open_in_cursor"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

Co-authored-by: Cursor Agent <[email protected]>
Co-authored-by: Cody Olsen <[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