Skip to content

feat(dev): ship imported bindings for HMR partial accept - #10856

Merged
h-a-n-a merged 4 commits into
mainfrom
feat/hmr-accept-exports
Sep 25, 2026
Merged

h-a-n-a merged 4 commits into
mainfrom
feat/hmr-accept-exports

Conversation

@h-a-n-a

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

Copy link
Copy Markdown
Member

import.meta.hot.acceptExports(names, cb) lets a module accept its own change only for the listed exports. An importer that reads only those exports is left alone. An importer that reads any other export still gets the update.

Rolldown ships the export names each importer reads, so the browser can make the same decision. For each static import edge, the export names the importer reads. "*" means the whole namespace (import * as ns, export * from, require(), non-JS records). An empty list means a side-effect-only import. Names are listed only for edges into a module that calls acceptExports, and bindings holds only the rows that have such an edge. A missing row or entry means "*".

// header.js:  import { count } from './counter.js'
// title.js:   import { label } from './counter.js'
// main.js:    import './header.js'; import './title.js'
__rolldown_runtime__.registerGraph({
  ids: ["main.js", "header.js", "title.js", "counter.js"],
  localCount: 4,
  edges:    [[1, 2], [3], [3], []],
  bindings: { 1: [["count"]], 2: [["label"]] },
  dynamicEdges: [[], [], [], []],
})

Vite: vitejs/vite#23463

closes #10061

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-hmr-accept-exports-rolldown-rs.voidzero-docs.workers.dev (commit 16171a6)

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://89e277c7-rolldown-rs.voidzero-docs.workers.dev 16171a6 2026-09-25T10:18:54.693Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://54d29daa-rolldown-rs.voidzero-docs.workers.dev 4338c42 2026-09-25T10:00:24.656Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c5660776-rolldown-rs.voidzero-docs.workers.dev df128bf 2026-09-25T09:20:18.374Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c69e08e6-rolldown-rs.voidzero-docs.workers.dev 10ac4bf 2026-09-25T08:34:41.655Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://d22e33ad-rolldown-rs.voidzero-docs.workers.dev 98083e6 2026-09-16T08:55:30.259Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://87aafac0-rolldown-rs.voidzero-docs.workers.dev 336351c 2026-09-14T10:31:26.998Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://360e0c32-rolldown-rs.voidzero-docs.workers.dev 1857cad 2026-09-11T09:17:59.173Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
275f84f 2026-09-10T13:15:09.649Z View logs ↗
  • Build: Failed ❌

View logs ↗
e5d1771 2026-09-10T09:12:18.206Z View logs ↗
  • Build: In progress 🔵

View logs ↗
e1c42f5 2026-09-10T09:10:19.895Z View logs ↗

View all previews: View all previews ↗

h-a-n-a commented Sep 10, 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.

@h-a-n-a h-a-n-a changed the title chore(deps): update github actions (#10749) feat(dev): ship imported bindings for HMR partial accept Sep 10, 2026
@netlify

netlify Bot commented Sep 10, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs ready!

Name Link
🔨 Latest commit 16171a6
🔍 Latest deploy log https://app.netlify.com/projects/rolldown-rs/deploys/6ab64a17fb365b0007c3a044
😎 Deploy Preview https://deploy-preview-10856--rolldown-rs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@h-a-n-a
h-a-n-a force-pushed the feat/hmr-accept-exports branch 2 times, most recently from e1c42f5 to e5d1771 Compare September 10, 2026 09:10
@h-a-n-a
h-a-n-a force-pushed the feat/hmr-accept-exports branch 2 times, most recently from 275f84f to 1857cad Compare September 11, 2026 09:15
@h-a-n-a
h-a-n-a marked this pull request as ready for review September 14, 2026 09:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1857cade54

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/rolldown/src/hmr/hmr_stage.rs Resolved
@codspeed

codspeed Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 3.46%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 6 untouched benchmarks
⏩ 10 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ bundle@multi-duplicated-top-level-symbol 582.5 ms 563 ms +3.46%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feat/hmr-accept-exports (16171a6) with main (ec3fe82)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 (8fb77b4) during the generation of this report, so ec3fe82 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@h-a-n-a
h-a-n-a force-pushed the feat/hmr-accept-exports branch from 336351c to 98083e6 Compare September 16, 2026 08:53
Comment thread crates/rolldown/src/ast_scanner/hmr.rs Resolved
@h-a-n-a
h-a-n-a force-pushed the feat/hmr-accept-exports branch from 10ac4bf to df128bf Compare September 25, 2026 09:17
@h-a-n-a
h-a-n-a force-pushed the feat/hmr-accept-exports branch from df128bf to 4338c42 Compare September 25, 2026 09:58
Also add accept_exports fixture cases for named and star re-exports and
for two import records to the same target.
@graphite-app

graphite-app Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Merge activity

@h-a-n-a
h-a-n-a merged commit b3b93d9 into main Sep 25, 2026
38 checks passed
@h-a-n-a
h-a-n-a deleted the feat/hmr-accept-exports branch September 25, 2026 11:15
@rolldown-guard rolldown-guard Bot mentioned this pull request Sep 30, 2026
shulaoda added a commit that referenced this pull request Sep 30, 2026
## [1.2.12] - 2026-09-30

### 🚀 Features

- inline common chunks containing import() and deduplicate shared code in lazy chunks (#11034) by @hyfdev
- experimental `inlineCommonChunks` support (#10899) by @hyfdev
- dev: ship imported bindings for HMR partial accept (#10856) by @h-a-n-a

### 🐛 Bug Fixes

- chunking: re-derive chunk exec orders after the runtime leaves its host chunk (#11005) by @hyfdev
- code-splitting: gate member-read init paths on the reading statement (#11039) by @hyfdev
- code-splitting: retain initialization paths through re-exported namespaces (#11037) by @hyfdev
- dev: reject non-ESM output formats in dev mode (#11038) by @h-a-n-a
- dev: align `import.meta.hot.accept` deps with Vite (#10997) by @h-a-n-a
- dev: clear the resolver cache when a file is created or deleted (#10986) by @waltuov
- error: name the resolved specifier in unresolved import diagnostics (#11014) by @linyiru
- make entries-aware chunk merging deterministic (#11002) by @hyfdev
- watch: avoid restarting macOS watcher for unchanged paths (#10992) by @sep2

### 🚜 Refactor

- dev: ship the dev runtime entry as one file (#10998) by @h-a-n-a
- binding: remove `__internalForcePanic` (#10989) by @IWANABETHATGUY

### 📚 Documentation

- fix cloudflare preview builds (#10996) by @sapphi-red
- fix build config loader warning (#10994) by @sapphi-red
- deps: use Vite 8 (#10993) by @sapphi-red

### ⚡ Performance

- dev: only ship rows with dynamic edges in registerGraph (#11019) by @h-a-n-a

### 🧪 Testing

- code-splitting: cover more re-exported namespace shapes (#11042) by @hyfdev
- webcontainer: cover the WebContainer download fallback in plain Node (#10966) by @shulaoda
- dev: pin the runtime entry file layout that Vite serves (#10983) by @h-a-n-a

### ⚙️ Miscellaneous Tasks

- pin VOID_API_URL for the docs deploy (#11041) by @shulaoda
- opt into the WebContainer smoke test for napi bumps and loader changes (#10967) by @shulaoda
- deps: upgrade oxc to 0.152.0 (#11018) by @camc314
- deps: update rust crates (#11012) by @renovate[bot]
- deps: update npm packages (#11011) by @renovate[bot]
- deps: update crate-ci/typos action to v1.50.3 (#11023) by @renovate[bot]
- deps: update test262 submodule for tests (#11022) by @rolldown-guard[bot]
- deps: update rollup submodule for tests to v4.63.5 (#11021) by @rolldown-guard[bot]
- deps: update dependency vite-plus to v1 (#11017) by @renovate[bot]
- deps: update github actions (#11010) by @renovate[bot]
- remove `CLAUDE.md` (#10925) by @iiio2
- verify release debug info by matching file IDs (#10988) by @IWANABETHATGUY
- deps: update rollup submodule for tests to v4.63.4 (#10940) by @rolldown-guard[bot]

### ❤️ New Contributors

* @waltuov made their first contribution in [#10986](#10986)
* @linyiru made their first contribution in [#11014](#11014)
* @sep2 made their first contribution in [#10992](#10992)

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.

[Feature Request]: HMR partial-accept support

2 participants