Skip to content

fix(dev): assign import bindings before initializing dependencies - #10783

Merged
shulaoda merged 1 commit into
mainfrom
08-26-fix_dev_assign_import_bindings_before_initializing_dependencies
Aug 26, 2026
Merged

shulaoda merged 1 commit into
mainfrom
08-26-fix_dev_assign_import_bindings_before_initializing_dependencies

Conversation

@h-a-n-a

@h-a-n-a h-a-n-a commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Handle named/namepace-export case in circular deps.

Fixes #10781

h-a-n-a commented Aug 26, 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.

@netlify

netlify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for rolldown-rs canceled.

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

@h-a-n-a
h-a-n-a force-pushed the 08-26-fix_dev_assign_import_bindings_before_initializing_dependencies branch 2 times, most recently from ac30d96 to 6020e7d Compare August 26, 2026 10:06
@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@rolldown/browser

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/browser@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/browser@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/debug

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/debug@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/debug@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

rolldown

pnpm add https://pkg.pr.new/rolldown/rolldown@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown@10783 -D
yarn add https://pkg.pr.new/rolldown/[email protected] -D

@rolldown/binding-android-arm-eabi

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm-eabi@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm-eabi@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-android-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm64@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-android-arm64@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-darwin-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-arm64@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-arm64@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-darwin-x64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-x64@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-darwin-x64@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-freebsd-x64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-freebsd-x64@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-freebsd-x64@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm-gnueabihf

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm-gnueabihf@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm-gnueabihf@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-gnu@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-gnu@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-arm64-musl

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-musl@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-arm64-musl@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-ppc64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-ppc64-gnu@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-ppc64-gnu@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-s390x-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-s390x-gnu@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-s390x-gnu@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-x64-gnu

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-gnu@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-gnu@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-linux-x64-musl

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-musl@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-linux-x64-musl@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-openharmony-arm64

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-openharmony-arm64@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-openharmony-arm64@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-wasm32-wasi

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-wasm32-wasi@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-wasm32-wasi@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-win32-arm64-msvc

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-arm64-msvc@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-arm64-msvc@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

@rolldown/binding-win32-x64-msvc

pnpm add https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-x64-msvc@10783 -D
npm i https://pkg.pr.new/rolldown/rolldown/@rolldown/binding-win32-x64-msvc@10783 -D
yarn add https://pkg.pr.new/rolldown/rolldown/@rolldown/[email protected] -D

commit: 6020e7d

@h-a-n-a
h-a-n-a marked this pull request as ready for review August 26, 2026 10:33

@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: 6020e7d3f1

ℹ️ 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".

@codspeed

codspeed Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 7 untouched benchmarks
⏩ 10 skipped benchmarks1


Comparing 08-26-fix_dev_assign_import_bindings_before_initializing_dependencies (f7ee9ac) with main (a47ac54)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 (cba0a90) during the generation of this report, so a47ac54 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

`export { x } from './dep.js'` registers the getter `x: () => import_dep.x`, but
`var import_dep = loadExports("dep.js")` was emitted in the module body, after every
`initModule` call. A module in a cycle runs during one of those calls and can read the
getter, so it saw `import_dep` as `undefined`.

Emit each binding right after its own `initModule`, the same placement #10761 gave the
`export *` copies. `export * as ns from` is a getter over a binding too, so it is fixed
by the same move.

Fixes #10781
@h-a-n-a
h-a-n-a force-pushed the 08-26-fix_dev_assign_import_bindings_before_initializing_dependencies branch from 6020e7d to f7ee9ac Compare August 26, 2026 10:42

shulaoda commented Aug 26, 2026 •

Copy link
Copy Markdown
Member

Merge activity

  • Aug 26, 11:01 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.
  • Aug 26, 11:01 AM UTC: shulaoda added this pull request to the Graphite merge queue.

@shulaoda
shulaoda merged commit b8c017d into main Aug 26, 2026
59 checks passed
@shulaoda
shulaoda deleted the 08-26-fix_dev_assign_import_bindings_before_initializing_dependencies branch August 26, 2026 11:04
@rolldown-guard rolldown-guard Bot mentioned this pull request Aug 26, 2026
shulaoda added a commit that referenced this pull request Aug 26, 2026
## [1.2.6] - 2026-08-26

### 🚀 Features

- minify: support property name mangling (#10374) by @Dunqing
- add `tsconfig: string` option to `transform` (#10727) by @sapphi-red
- rolldown_plugin_vite_transform: add `tsconfig` option (#10725) by @sapphi-red
- rolldown_plugin_vite_resolve: add top-level `tsconfig` option (#10724) by @sapphi-red
- dev: expose module graph queries on the dev engine handle (#10716) by @h-a-n-a

### 🐛 Bug Fixes

- dev: assign import bindings before initializing dependencies (#10783) by @h-a-n-a
- dev: copy star re-exports before initializing dependencies (#10761) by @h-a-n-a
- dev: register an empty exports object for a module without exports (#10772) by @h-a-n-a
- name the module when a `codeSplitting` group callback returns a wrong type (#10753) by @IWANABETHATGUY
- dev: map dev rename events like build watch (#10758) by @shulaoda
- clear resolution cache when `TsconfigCache::clear` is called (#10726) by @sapphi-red
- dev: resolve in-flight `ensureLatestBuildOutput` when the engine closes (#10730) by @h-a-n-a
- binding: replace undeclared BindingErrorsOr with BindingResult in hook types (#10717) by @h-a-n-a

### 🚜 Refactor

- rolldown_fs_watcher: collapse fs-watcher backends behind a single FsWatcher (#10735) by @shulaoda
- hoist invariants out of the `codeSplitting` group loop (#10744) by @IWANABETHATGUY

### 📚 Documentation

- document shared notify rename mapping (#10759) by @shulaoda
- update watch-mode internals for unified FsWatcher (#10736) by @shulaoda

### ⚡ Performance

- batch `codeSplitting` group `test` / `name` calls (#10745) by @IWANABETHATGUY
- deduplicate used symbol ref readers (#10742) by @Boshen
- reduce release debug formatting (#10728) by @Boshen
- enable compiler cache via `module.enableCompileCache()` (#10678) by @btea
- deduplicate regress codegen (#10732) by @Boshen

### 🧪 Testing

- define: add expected failure for default parameter scope (#10780) by @hyfdev
- use an absolute filename for transform tsconfig path (#10782) by @shulaoda

### ⚙️ Miscellaneous Tasks

- deps: upgrade oxc to 0.147.0 (#10767) by @camc314
- deps: update resolver dependencies (#10766) by @Boshen
- deps: update rollup submodule for tests to v4.62.5 (#10770) by @rolldown-guard[bot]
- deps: update dependency vite-plus to ^0.3.0 (#10757) by @renovate[bot]
- deps: update npm packages (#10750) by @renovate[bot]
- deps: update rust crates (#10748) by @renovate[bot]
- deps: update rust crate napi to v3.12.2 (#10738) by @renovate[bot]
- deps: update dependency rust to v1.98.0 (#10733) by @renovate[bot]
- wasi: cap each Node Test attempt with timeout to survive hangs (#10709) by @hyfdev

Co-authored-by: shulaoda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: circular re-export is undefined in a lazy patch (devMode.lazy)

2 participants